Load different style sheets css for same type

Hey,
I’d like to load different style sheets for different pages/posts or whatever.
What I need is some kind of code for my functions that adds styleA.css when post/page/whatever is published before specific date. And the same for styleB.css when published AFTER specific date.
Do you have an idea or a different suggestion how I could load different style sheets for the SAME kind of pages but still make a difference (like my idea with the date)

Hello @awecesar,

Thanks for asking. :slight_smile:

For that you will have to use WordPress conditional statements. Please note that the customisation you are looking for is something we don’t recommend and will fall outside the scope of support we can offer.

However, to help you get started I can share few resources that you can take a look to get started.



http://webdevzoom.com/add-javascript-and-css-files-to-spesific-post-or-pages-in-wordpress/

To learn more about conditional statements in WordPress, please take a look at following resource.

https://codex.wordpress.org/Conditional_Tags

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.