wp_enqueue_style absolutely will not work
-
I am pulling my hair out over this because I cannot seem to get wp_enqueue_style to work. I’ve used this the proper way in many themes I’ve built with no problems.
I downloaded a custom theme, (this might be the problem) BUT I’ve searched through the theme and everything is standard, nothing in functions.php overwriting anything etc that I see.
In functions.php at top
function my_scripts_method() { wp_enqueue_script( 'jquery' ); wp_enqueue_script('flexslider', get_template_directory_uri() . '/js/jquery.flexslider.js', array('jquery')); wp_enqueue_script('elastislide', get_template_directory_uri() . '/js/jquery.elastislide.js', array('jquery')); wp_enqueue_script('resportsive', get_template_directory_uri() . '/js/scripts.js', array('jquery')); wp_enqueue_script('ticker', get_template_directory_uri() . '/js/ticker.js', array('jquery')); wp_enqueue_script('respond', get_template_directory_uri() . '/js/respond.min.js', array('jquery')); wp_register_style('pdi', get_stylesheet_directory_uri() . '/css/pdi.css', false, '1.0', 'all' ); wp_enqueue_style('pdi'); } add_action('wp_enqueue_scripts', 'my_scripts_method');
wp_head() is in the theme header, and the javascript files are enqueueing properly, and I can even add a custom js enqueue and it works, but the stylesheet will absolutely not print out. Nor do I get any errors with debug mode on.
I’ve also tried straight
wp_enqueue_style('pdi', get_stylesheet_directory_uri() . '/css/pdi.css', false, '1.0', 'all' );
without registering first and that doesn’t work either.Any advise on how I could track down why this isn’t working?
- The topic ‘wp_enqueue_style absolutely will not work’ is closed to new replies.