CSS act on only specific page ?

Hi @dpenny2,

There are 2 ways to do that easily with WPCode.

The first one is the one you mentioned – adding the code to the Site Wide Header and using conditional logic to limit where the snippet is loaded.

The other option is CSS specific – because you are using a CSS snippet, in most cases you can target a specific page with the styles by including the page-specific class added to the body. Most themes will use the body_class function and that will have a class specific to a page or post by its id.

So you could wrap the style like this, replacing 2 with the id of your page.

.page-id-2 .your-header {

}

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer