Home › Forums › Automattic › Forefront › Remove Featured Image except front page
-
AuthorPosts
-
A Darling AffairMemberHi I learned on previous thread how to remove the page title/featured image, playing with each I determined that what I want is to remove the featured image. I used this code:
.page .attachment-forefront-page-thumbnail {
display: none;
}Which did remove the featured image – but also the title on all pages, and also my featured image on my front page.
I have two directories for event vendors like this:
And will soon have a third. Is there any way to just remove the featured image from my directory category pages (not the page title)? What I want is for the image to show up on the directory but not have the image on the page it clicks through to – only the title. And I’m guessing I’m going to have to do it for each and every page individually? There’s no way to do it to all pages except my front page?
I hope that makes sense,
TIA
The blog I need help with is adarlingaffair.comJune 9, 2014 at 6:36 pm #152268
Kathryn P.Happiness EngineerIf you want featured images to show on grid pages – like this one http://adarlingaffair.com/sunshine-coast-directory/ – but not on the individual page that the grid items link to, like this one http://adarlingaffair.com/sunshine-coast-directory/beauty/ …
Those individual pages are called “child pages” and you can target them with CSS, as they have a special page-child class. Try adding this to your custom CSS:
.page-child .hero.with-featured-image img {
display: none;
}
.page-child .hero.with-featured-image > div {
position: relative;
}
.page-child .hero.with-featured-image .page-title {
color: inherit;
text-shadow: none;
}Let me know if that does the trick.
June 9, 2014 at 10:31 pm #152280
A Darling AffairMemberFantastic thank you – the only thing I’m finding now is that the bottom line (beneath the title) is now absent?
June 10, 2014 at 2:21 pm #152304
Kathryn P.Happiness EngineerTry removing this piece:
.page-child .hero.with-featured-image .page-title {
color: inherit;
text-shadow: none;
}And adding this modified code instead:
.page-child .hero.with-featured-image .page-title {
border-bottom: 1px solid #F0F2F0;
color: inherit;
padding-bottom: 45px;
text-shadow: none;
}June 10, 2014 at 11:52 pm #152354
A Darling AffairMemberOkay so the border is back, but it doesn’t extend the full width of the screen – i.e. its shorter than the top border
June 11, 2014 at 1:45 pm #152384
Kathryn P.Happiness EngineerAh, good catch. :-)
Try replacing these two pieces of the current custom CSS:
.page-child .hero.with-featured-image > div {
position: relative;
}
.page-child .hero.with-featured-image .page-title {
border-bottom: 1px solid #F0F2F0;
color: inherit;
padding-bottom: 45px;
text-shadow: none;
}with this revised version:
.page-child .hero.with-featured-image > div {
position: relative;
border-bottom: 1px solid #F0F2F0;
}
.page-child .hero.with-featured-image .page-title {
color: inherit;
text-shadow: none;
}I think that should do the trick: https://cloudup.com/ck7mjnmzDcX
June 11, 2014 at 11:05 pm #152406
A Darling AffairMemberPerfect! All sorted, thank youx
June 12, 2014 at 1:37 pm #152438
Kathryn P.Happiness EngineerExcellent. I’ll mark this thread as resolved and close it, but feel free to start a new one if you need help with anything else.
-
AuthorPosts
The topic ‘Remove Featured Image except front page’ is closed to new replies.