- This topic has 22 replies, 4 voices, and was last updated 3 years, 8 months ago by Tom.
January 8, 2017 at 7:40 pm #262014Gabriel
I’m trying to use the Page Header add-on on a custom post type. I can set everything with the meta in the admin, but the page header elements aren’t displaying on the page once published. Do I need to add instruction somewhere so my custom post type can use the page header add-on?
thanks!January 8, 2017 at 11:02 pm #262046TomLead DeveloperLead Developer
If the page you’re viewing is the index of your custom post type, WordPress ignores the meta box values (same as the blog index for example).
However, you can use the Blog Page Header and apply it to your custom post type: https://docs.generatepress.com/article/blog-page-header/January 9, 2017 at 5:51 am #262142Gabriel
I did try that, but it doesn’t work. I’m using pods.io framework to manage my custom post type. The page I’m working on is here: https://splitboardqc.ca/splitboard/prior-shotgun-split-159-xtc/. Any other idea on why the page header isn’t displaying?
thanks!January 9, 2017 at 8:16 am #262204TomLead DeveloperLead DeveloperJanuary 9, 2017 at 9:40 am #262244Gabriel
I’m having issues with Siteground so my site is throwing 404 on all pages :(. As for the code, I’m not using any php, I’m using the meta boxes from the admin pages or the customizer.January 9, 2017 at 11:34 am #262302Gabriel
My site is back online now, you should be able to display the page.January 9, 2017 at 8:39 pm #262440TomLead DeveloperLead Developer
Hmm, doesn’t look like an index page, so the meta box should work.
Can you show me a screenshot of your Page Header meta box on that page?January 10, 2017 at 6:05 am #262553January 10, 2017 at 10:07 am #262637TomLead DeveloperLead DeveloperJanuary 10, 2017 at 11:02 am #262665Gabriel
I’ve added firstname.lastname@example.org as an admin.January 10, 2017 at 10:02 pm #262804TomLead DeveloperLead Developer
Hmm, not really sure what’s going on there.
What if you create it as a regular page? It works? It might have something to do with it being a custom post type.. Is it using a custom template?January 11, 2017 at 7:11 am #262935Gabriel
It’s working A1 on everything except the post types created by pods. To my understanding, it’s not using custom templates. My plan B is to create pages and fetch the pods data. I’ll move on on that path.January 11, 2017 at 9:39 am #263011TomLead DeveloperLead Developer
The only reason I can think of is that the hooks are present on the templates used by pods. The page header is simply hooked into the generate_after_header hook, so if it’s present it should display.June 14, 2017 at 4:36 am #333364Andy
So have I understood… we can’t add a Page header section to a custom post type post? (even though the Page Header section box is present on all edit screens?) So is there no other ‘get-round’ (other than using the Blog Header image feature – I would want to add a different header to multiple posts?
AndyJune 14, 2017 at 9:20 am #333516TomLead DeveloperLead Developer
I’m working on something very, very cool related to this right now. Hoping it’s going to be the main big feature in GP Premium 1.4 🙂
- You must be logged in to reply to this topic.