Set CSS on single page in WordPress

 

 

While setting up pages on WordPress we might need to customize CSS on single page.
This is true on Landing pages where we prefer users don’t see the normal header or header menu.

In WordPress we easily can use the appearance > customise > additional css tool to customize our css tags.

How can we customise CSS code on a single page or post?

CUSTOMISE THE BLOG PAGE

In the example we want to remove the h2 heading from the blog page.

It is simple, just add the tag .blog to your css script.

.blog h2 { display: none !important; }

The change will appear only on your blog page

CUSTOMISE A POST

We are now going to remove h1 heading from a specific page which has id 576

.postid-576 h1 { color: red; }

CUSTOMISE ANY PAGE

The last one is changing specific css on a WordPress page

.page-id-711 .entry-title { display: none; }

You can clearly manage every tags you like

.page-id-711 h1, h3, div, p, img { margin: 10px; }

complete css tags at this page https://www.w3schools.com/w3css/w3css_tags.asp

Leave a Reply

Your email address will not be published. Required fields are marked *