[Support request] No featured image if using page header?

Home Forums Support [Support request] No featured image if using page header?

Home Forums Support No featured image if using page header?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #589349
    Chad

    I have a page header that does not use a featured image, nor has a background image assigned.

    When I add the header to my “artwork” posts (they’re a custom post type named Artwork), the artwork’s featured image doesn’t load.

    I am simply trying to use the page header feature to add a search bar to each page on my site. It works fine on the rest of the site, but those pages don’t have featured images.

    I’ve had to disable it on my artwork posts for now, so you won’t be able to see it. I wanted to verify if page headers are supposed to “steal” the featured image, even if they aren’t using them.

    Thanks!

    GeneratePress 2.1.2
    #589412
    Sridhar

    Just tested and it is working fine for me.

    I created a Page Header (left the image and featured image for it empty), assigned it to Artworks single CPT entries and it appears on the frontend and uses the featured image of the CPT entry.

    #589445
    David
    Staff
    Customer Support

    Hi Chad, if a page header has content then yes it will replace the featured image.
    Considering the search bar is common to all pages, you could place that content in the after Header Hook.
    We can help with the markup and CSS if you want to go this route.

    #589610
    Chad

    Ah… was hoping I could use the page header for this… since there are a couple pages here and there that I disable loading the page header (search bar).

    A couple pointers where to put the code and I can figure out the rest. 🙂

    Thanks!

    #589617
    David
    Staff
    Customer Support

    Hi Chad, you can add the code to the Dashboard > Appearance > GP Hooks – probably the After Header Hook is the best place to start. If you need a hand with a PHP conditional or some CSS then let us know. Might be worth using the GP .grid-container class for your content wrapper to keep it within the confines of the page content.

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