Black Friday Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Resolved] Headers in absence of featured image

Home Forums Support Headers in absence of featured image

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #388464
    Jacobo

    I’m using PAge Headers to have hero images on my blog posts.
    BUT as I don’t have featured image in all of my posts, I’d prefer those to stay without a header.

    I’ve set up a different header (not auto-applied) with no content for those posts and assigned it manually on each post.

    Is this the way to do it? Or is there any way of telling GP: if there’s no featured image, use “normal” template?

    Thanks!!!

    GeneratePress 1.4
    #388745
    Leo
    Staff
    Customer Support

    Hi there,

    Not quite sure what you mean? Can you explain a bit more?

    What’s the “normal” template?

    Let me know 🙂

    #388856
    Jacobo

    Hey!

    (1) This is a blog post with the header I’ve created (auto applied to all blog posts): https://imgur.com/ZSvSTKh

    (2) This is a blog post without featured image with the auto applied header: https://imgur.com/tCFQDuz

    (3) This is a blog post where I don’t want that header since it doesn’t have a featured image: https://imgur.com/VxajFdq

    For this last case (no featured image) I’ve created an empty header that I apply manually on each post without featured image (thus overriding the auto applied header and avoiding situation #2).

    I was wondering if there’s a better way of doing this like “don’t auto apply the header if the blog post doesn’t have a featured image”, and if having a blank header applied can cause any problem.

    Thanks!!!

    #388977
    Leo
    Staff
    Customer Support

    I see. Thanks for the explanation.

    That is exactly how I would do it 🙂

    #389185
    Jacobo

    Great, thanks for the confirmation 😉

    Would be nice to have a standard fallback for when there is no featured image.

    Maybe the team can consider that for the future. But for now, is there any kind of hook/filter for Page Headers we can use to add some code? It’s kind of hard to go through 100s of posts to manually assign this.

    Cheers!

    #389456
    Leo
    Staff
    Customer Support

    Unfortunately there’s no way to use code for this.

    Thanks for the suggestion 🙂 This is the first request we’ve seen on this but if more people run into this issue we will definitely consider it!

    #389461
    Jacobo

    Thanks again for the help Leo!

    #389481
    Leo
    Staff
    Customer Support

    No problem at all! Those are good questions and suggestions 🙂

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