0

I am having an issue with page templates in Wordpress. I have created some for my website but they are not using the wp_enqueue_style in my functions.php.

anybody know why this is? mainly my stylesheet is in functions.php so i want it to use the same one

  • Do your templates include the wp_head() and wp_footer() functions? – Jacob Peattie Sep 12 '18 at 9:29
  • I believe I do but I don't think it is in the head tag as said below – Jenova1628 Sep 12 '18 at 10:03
1

Your enqueued css should work for all page template if there is no condition applied. could you please share it how you enqueued?

Another thing you can check. In header.php, can you please check that wp_head(); function has been called properly in the page template's head tag. if not exists in the header.php between the head tag then add this function.

Thanks.

  • Thank you for your help it appears some templates did not have wp_head(); when putting this in the <head> tag it worked – Jenova1628 Sep 12 '18 at 10:05
  • Make sure you also have wp_footer() in the footer, before the closing </body> tag. Some scripts won't work if you don't. – Jacob Peattie Sep 13 '18 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.