This is my file path:
D:\web server\blog.dev.cc\wp-content\themes\ablog\css
for java script file path
D:\web server\blog.dev.cc\wp-content\themes\ablog\assets\js
I have checked every code again and again but my problem has not been solved. I am trying to change "
to '
icon but not working and change some path on my CSS file and JavaScript but my CSS not show
// steel sheet
function ablog_add_stylesheet() {
// outer styles sheet
wp_enqueue_style('font-awesome.min.css', get_template_directory_uri() . '/css/font-awesome.min.css'); // font awesome
wp_enqueue_style('elegent-icons.css', get_template_directory_uri() . '/css/elegent-icons.css' );// icon
wp_enqueue_style('bootstrap.min.css', get_template_directory_uri() . '/css/bootstrap.min.css',array(), '4.2.1','all');// bootstrap css
wp_enqueue_style('owl.carousel.css', get_template_directory_uri() . '/css/owl.carousel.css' ); // own file for slide css
//own CSS Files style.css
wp_enqueue_style( 'lookway_header_css', get_template_directory_uri() . '/style.css' ); // main theme css file
wp_enqueue_style( 'lookway_header_css', get_template_directory_uri() . '/css/header.css' ); // header css
wp_enqueue_style('themes.css', get_template_directory_uri() . '/css/themes.css'); // for artical
wp_enqueue_style('responsive.css', get_template_directory_uri() . '/css/responsive.css' ); // responsive
}
add_action( 'wp_enqueue_scripts', 'ablog_add_stylesheet' );
// script
function ablog_add_stylesheets() {
wp_enqueue_script('modernizr-2.8.3.min.js', get_template_directory_uri() . '/assets/js/modernizr-2.8.3.min.js' ); // script
wp_enqueue_script('plugins.js', get_template_directory_uri() . '/assets/js/plugins.js'); // script
wp_enqueue_script('main.js', get_template_directory_uri() . '/assets/js/main.js'); // script
}
add_action('wp_enqueue_scripts', 'ablog_add_stylesheets');
When adding file not show any CSS on my theme
In your code same handle use for two style ie lookway_header_css
please change that. You can use the following code to enqueue the style.css :
wp_enqueue_style( 'theme-style', get_stylesheet_uri() );
And also just check that wp_head()
and wp_footer()
called correctly at header.php and footer.php
Don't forget to put the <?php wp_head(); ?>
<?php wp_head(); ?>
somewhere inside your head
and <?php wp_footer(); ?>
<?php wp_footer(); ?>
at the end of the body
, otherwise WordPress doesn't know where to print scripts and styles.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.