Hello I am using the Twenty Ten theme on a WordPress 4.9.1 I need to remove the header image for just some specific pages, but not the whole site. Is there a custom css code I can use for this? I tried some other I found in searches, but had no luck.

Thank you.

有帮助吗?

解决方案

Get the id number of the pages from which you want to remove the header images, then you can hide them with CSS. This may not, arguably, be the optimal method,but it'll work:

So, say the page ID #s are 42, 56, and 506.

.page-id-42 #branding img,
.page-id-56 #branding img,
.page-id-506 #branding img {
    display: none;
}

Here's an image file - note that on any page, if you look at the inspector, the page-id-# class will be shown on the body tag, like page-id-445 here:

enter image description here

许可以下: CC-BY-SA归因
scroll top