Ben Jones
Ben Jones

Reputation: 525

Using CSS only I need to hide a DIV on 1 page only

WordPress install 4.61, Sydney Theme http://www.benpaddlejones.com

On the home page (slug is home) I need to hide this div:

How to I define the class or id specific to this page?

(I know how to do {display: none;})

I've tried a few things and get nothing I'm pretty sure it's how I'm define the class?

Ben :-)

Upvotes: 1

Views: 72

Answers (1)

roberrrt-s
roberrrt-s

Reputation: 8210

Wordpress automatically adds a class to the body based on the ID of the page, the name is something like 'page-27' or something simular, so apply this CSS

.page-<id> .item { 
    display: none;
}

Upvotes: 3

Related Questions