Black Friday Sale! Get up to $40 off GP Premium!Learn more

Do not show featured image in a post

Home Forums Support Do not show featured image in a post

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #169898
    ian

    Hi

    I do not want to show featured image in a post still want want featured images to show on home page and or catergory pages

    Feel I am missing the obvious

    Ian

    #169970
    Sven

    Hi Ian,

    something like this?

    .page-header-image-single {
    display: none;
    }

    Best regards,
    Sven

    #170081
    Tom
    Lead Developer
    Lead Developer

    Thanks, Sven! That’s perfect 🙂

    #170087
    Sven

    Recently I had the same requirement and as you are extremely busy since yesterday I thought I’d help out!
    😉

    Kind regards,
    Sven

    #170115
    ian

    Thanks to you both
    that does work but I did not explain fully enough

    I only don’t the featured image to show on the post page
    If a image is set in the page header addon I still want that to show on the post page

    Thanks again

    IAn

    #170268
    Tom
    Lead Developer
    Lead Developer

    Interesting – I’m out of office due to my baby being born but hopefully will be back tomorrow evening. Need to inspect some code to see if this is possible.

    Will let you know 🙂

    #170304
    ian

    Take your time
    Enjoy your baby

    Ian

    #170516
    Tom
    Lead Developer
    Lead Developer

    Ok, looked into this.

    There’s one option, but I’m not sure it will work for you.

    When an image is set as a featured image, we add a class to the body element which we can target.

    .featured-image-active .page-header-image-single {
        display: none;
    }

    So that will only apply if a featured image is set.

    However, if a featured image is set and a page header image is set, it will still apply, so it’s not a perfect solution.

    #170623
    ian

    Thanks for looking into it for me
    That won’t work for me you are right

    I can work around it though
    using
    .page-header-image-single {
    display: none;
    }
    and writing my posts in a slightly different way

    Thanks again

    Ian

    #170663
    Tom
    Lead Developer
    Lead Developer

    No problem – I’ll look into writing in better detection so something like this is more possible in the future 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.