How Do I Make My CSS a Specific Page in WordPress?

Making CSS specific to a WordPress page is easy. Simply add the following line to your theme’s functions.php file:

add_action(‘wp_footer’,’my_specific_css’);

Then include the CSS you want to use in your page’s HEAD tag:

In the above example, my_specific_css is a function that takes two arguments. The first is the name of the specific CSS file to load, and the second is a comma-separated list of page ID’s that the CSS should apply to.

So, if you wanted to use the same style on all pages in your WordPress site, you’d include the following line in your functions.php file:.

add_action(‘wp_footer’,’my_general_css’);

This will load the general style.css file in the footer of your WordPress site, and any page with a specific ID as its second argument will use the my_specific_css function to load the specific CSS file for that page.