Site logo

Archived topic

No featured image if using page header?

4 replies · Started by Chad on June 1, 2018

Viewing posts 1–5 of 5

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!

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.

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.

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!

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.

This archived topic is closed to new replies.