Archived topic
Page header on 404, calendar, archive, etc?
9 replies · Started by Katie Jones on July 29, 2017
Hi there,
I've been using the generate_before_main_content hook to put page headers on views that don't have a page in WP. That works well when the width is contained. How do I do it for the full width page header?
Thanks,
Katie
Hi there,
If I recall correctly you are beta testing the new page header add on?
If so you can actually set them in Page Headers > Global locations.
Let me know if this helps.
Oh, hooray! :) I am! I didn't even see that as a new post type, YAY! :) Thank you! And good memory!
No problem!
I've been playing with this - so far a couple things:
+ I need a way to add a header to a WooCommerce product category. How can I do this (here or in a hook?).
+ I had a regular page that wasn't displaying the full page header option, I'm not sure why - instead, it only allowed me to select a page header I'd made as a custom post type. So I used that, though FYI I'm not sure why that was.
Also, a feature request: I would love a WYSIWYG in the page header content, for clients.
Anyway - I'm very excited about this new feature, thank you!
Ah, and I'm also having trouble with the pages generated by The Events Calendar. The option is there for the post type 'events' (though not the /events page TEC generates) - and the header isn't showing up on the post type, either.
Is there some code I could use to hold me over for now?
1. You can go into "Products > Categories" and edit a category. You'll see a field to add a Page Header.
2. This is the new method Page Header will use - creating re-usable page headers instead of individual headers for each page.
3. A WYSIYG editor is something I'll likely add via a filter, as adding it into core now would mess with various HTML users might be using (including myself).
4. If a page is generated, you would apply a page header like any other pages. The "Events" option that shows up in Global Locations would likely be the archives for all events - is the page header not working on those archives?
Thanks for the feedback!
Thanks, Tom - that got the header showing on my products category page perfectly!
I figured out the deal with 'Events' - I needed to set the option under the Events Calendar display settings to use 'Default Events Template' instead of 'Default Page Template' (the default): https://ibb.co/esx2jk
PS - loooove the background video! I guess that's been out a while though I haven't used it til today - awesome!!
Awesome, glad I could help! :)