Remove Featured Image except front page

Home Forums Automattic Forefront Remove Featured Image except front page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #111697 Resolve

    A Darling Affair
    Member

    Hi 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:

    http://adarlingaffair.wordpress.com/wp-admin/customize.php?url=https%3A%2F%2Fadarlingaffair.wordpress.com%2Fwp-admin%2Fwidgets.php

    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.com
    #152268

    Kathryn P.
    Happiness Engineer

    If 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.

    #152280

    A Darling Affair
    Member

    Fantastic thank you – the only thing I’m finding now is that the bottom line (beneath the title) is now absent?

    #152304

    Kathryn P.
    Happiness Engineer

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

    #152354

    A Darling Affair
    Member

    Okay so the border is back, but it doesn’t extend the full width of the screen – i.e. its shorter than the top border

    #152384

    Kathryn P.
    Happiness Engineer

    Ah, 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

    #152406

    A Darling Affair
    Member

    Perfect! All sorted, thank youx

    #152438

    Kathryn P.
    Happiness Engineer

    Excellent. 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.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Remove Featured Image except front page’ is closed to new replies.