Set CSS on single page in WordPress

css single page
 

 

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?

[siteorigin_widget class=”SiteOrigin_Widget_Image_Widget”][/siteorigin_widget]

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

[siteorigin_widget class=”SiteOrigin_Widget_Image_Widget”][/siteorigin_widget]
[siteorigin_widget class=”SiteOrigin_Widget_Image_Widget”][/siteorigin_widget]

CUSTOMISE A POST

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

.postid-576 h1 { color: red; }

[siteorigin_widget class=”SiteOrigin_Widget_Image_Widget”][/siteorigin_widget]
[siteorigin_widget class=”SiteOrigin_Widget_Image_Widget”][/siteorigin_widget]

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; }

[siteorigin_widget class=”SiteOrigin_Widget_Image_Widget”][/siteorigin_widget]
[siteorigin_widget class=”SiteOrigin_Widget_Image_Widget”][/siteorigin_widget]
complete css tags at this page https://www.w3schools.com/w3css/w3css_tags.asp

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

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