[Resolved] Disable Page Hero Featured Image on single template

Home Forums Support Disable Page Hero Featured Image on single template

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1158271
    Stephanie

    I’ve searched the forums and read posts about how to disable the featured image on single custom post templates but the CSS I’ve seen does not seem to work.

    Should this CSS:

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

    be changed to:

    .single .page-hero-background-image {

    display: none;

    } ?

    Explanation: I used Elements to create a Page Hero section with a featured image that’s supposed to appear across the site.

    What’s happening with my Events Template is the featured image that’s needed for the Events Manager plugin and the Event custom post is replacing the image that’s supposed to appear in the Page Hero section. I disabled the featured image option in the settings I found for Single page templates in the Customizer under Blog, I also disabled it for the Event page. I added CSS and I tried to write a function based on what I’ve seen in the forums but I seem to have messed up.

    The staging site is here: http://34.69.246.245/events/the-elements-of-fiction-new-homeschool-workshop/

    #1158274
    Leo
    Staff
    Customer Support

    Hi there,

    You are referring to this image right?
    https://www.screencast.com/t/X1eLoioaApbT

    If so that’s added with Elementor so none of GP’s options will work.

    Let me know if I’m missing something here 🙂

    #1158281
    Stephanie

    It’s added as a featured image. It’s in the page hero section which is ruled by GeneratePress, as is the Header and Footer. Only the page container is Elementor.

    In the page container Anywhere Elementor Pro pulls it in as a post image as does the Events Manager plugin in the sidebar. The image was not added with Elementor, it was added the usual way you add Featured images in WordPress. I think I need to write a function so that when the page is Events, I don’t pull in that image. Then the fallback image from GeneratePress will prevail.

    #1158287
    Leo
    Staff
    Customer Support

    Sorry I’m a bit confused.

    Are you trying to remove the image in red or green?
    https://www.screencast.com/t/uBCbZK4Tj

    Let me know 🙂

    #1158308
    Stephanie

    Sorry, I didn’t mean to be confusing. The image that’s a problem is the green one. The page hero.

    The page hero section was created using Elements in GeneratePress Premium. The background image appears when you add a featured image.

    The page hero is supposed to have a banner with children. It appears on all the pages of the site except the front page.

    Here’s the page on the original site: https://uptownstories.org/writing-workshop/the-elements-of-fiction-new-homeschool-workshop/

    I’m not great in PHP but I think I need to write a function that says if the single event page has a featured image don’t use it in the page hero.

    #1158315
    Leo
    Staff
    Customer Support

    So what if you create a page hero using the custom image (instead of featured image) as the background image and assign that the single event page?

    Or I’m still missing something here?

    #1158325
    Stephanie

    I have to use featured image for each Events post. That’s how it’s set up in the Events Manager plugin. That image is to appear with each event on the events (workshops)page.

    I used GeneratePress to create a Page Hero section.

    https://docs.generatepress.com/article/how-to-create-a-page-hero/

    Because I used the featured image for the event, GeneratePress is putting that image in the Page Hero section. The only way to add an image to the Page Hero section seems to be via featured image.

    I don’t want the event custom post type’s image (the post image, the featured image) in the Page Hero section. I want the banner with the children, the one that shows on the rest of the site.

    I have disabled the featured image/Page Hero on the single Event page in the page settings and in the Customizer settings for Blog etc. The image still shows up. How do I keep that image, the one you circled in green, from appearing?

    I think I need to write a function to fix this.

    Thanks and best wishes

    #1158335
    Leo
    Staff
    Customer Support

    The only way to add an image to the Page Hero section seems to be via featured image.

    There are actually two ways to add a background image to the page hero.

    – Custom image: This option allows you to upload a custom image specific for this page hero. This means that every page with the page hero applied will have this custom image you’ve uploaded. I believe this is what you need (for example, the banner with children image)

    – Featured image: This option uses the Featured Image added in the pages or posts as the background image. This means that the background image will be different every page according to your featured image.

    Let me know if we are on the right track 🙂

    #1158339
    Stephanie

    Yes, that definitely solves it! Thank you.

    I still don’t understand why the disable settings didn’t work but hey, at least there’s a way to fix this!

    #1158406
    Leo
    Staff
    Customer Support
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.