RC4 - Headers - Blog Categories - Pulling "Post" Header rather than Global Header

Hi Team

I’m customising Headers using the newish ‘shortcode’/meta shortcuts (eg. Post Title, Archive Title etc etc.)

The custom header is working well for Pages per below:

And also working well for “Posts” (using a different header with Post Meta included), pulling through the Post Title:

However… when I try and utilise a slightly different header for the Blog CATEGORIES pages - using the {{dc:archive:title}} meta tag per below…

Pro doesn’t actually allow me to select the ‘Category Indexes’ within the Header selection menu (NOTE: and even if I set the menu to Global it still doesn’t pull through this header either):

It is pulling through the Header associated with the “Blog Posts” - which is set to show the Blog Post title - therefore, the first Blog Post title is pulling through on the Category Page, rather than the Archive Title:

You can see from above it’s still showing the Blog Post title meta, Post Author & Date Meta etc from the Blog Post “Draft Blog Header”, rather than the Blog Category (General) and the “Back to Insights” button from the “Blog Categories Header” that should be pulling through.

Theoretically, the “Blog Categories Header” should be pulling through on the Blog Indexes as “Posts Page: Indexes” has been activated… but Pro is pulling through the “Draft Blog Header” which is only set to activate on one Post per above, but it’s still pulling that one through as well for Categories… a little odd…

I think this is either a bug, or something that’s possibly overlooked where Blog Categories (using Archive Title meta tag in the Header) isn’t being pulled through when selected Posts Page: Indexes" in the Header Selection Area.

Hope this all makes sense.

Thanks
Sam

Hi Sam,

You’re right, there are some inconstancies here. We are aware it’s working slightly differently across contexts. The Layout builder will introduce a way for to choose the context you want to preview in. This way when you’re editing a Header (or Layout) you can preview it in multiple contexts without having to save and change the assignments. We’ll also be adding more assignment contexts, and changing a bit of how that detection works.

I just posted an example of programmatically setting the header assignment over here: https://theme.co/apex/forum/t/rc3-header-assignment-missing-pages/63634/6

As far as dynamic content goes, we may need to make some adjustments there when we do the Layout builder. Right now it just uses the query data available at the time the text replacement is being run. For example “Archive Title” shouldn’t pull the archive title of the first post like that.

Regretfully, we’re not changing anything for this release, but the Layout builder will bring solutions to the Header and Footer builder as well.

Thanks Alex

To summarise, from what I’ve noticed working on a few of my other sites now are the following issues re. Dynamic Content:

  • “Post Title: {{dc:post:title}}” does not pull through the Primary Blog Page title (eg. News), it pulls the most recent Blog Post Title.

    • The use of “Archive Title: {{dc:archive:title}}” is a workaround here and pulls through “News”
  • “Archive Title: {{dc:archive:title}}” also pulls through the Category/Archive Titles within the Blog

  • However, to allow this functionality, I have to select “All Posts” within the Header Assignments options - which then forces the Single Post headers to show their respective Archive name (eg. Primary Category), rather than their respective Post Titles.

  • There is also an inability to select Blog Category/Tag Archives in the Header Builder.

If there was the ability to select the Blog Category/Tag Archives in the Header Builder, then this would likely resolve most of these issues. However, simply having a ‘dynamic content’ option that actually just shows the proper Page Title across all Page/Post/Archive options will allow only one Header option for every page available.

It should effectively be whatever the title is on the final link of the Breadcrumb - as that is always correct.

Cheers,
Sam

Hi Sam,

Thanks for sharing some more about your experience here. We’ve slated some time to audit how this works alongside the Layout Builder update. We likely won’t be making any changes until that time, but we do plan on making things consistent.

1 Like

I’m probably just repeating what has been said but as it is something I am doing with a current site I thought I would add to this discussion. Using the latest Beta. 3.1 Beta 3

If you create a header with a dynamic title and use {{dc:post:title}} it does not work correctly if you are on an archive page or shop category page.

If you use {{dc:archive:title}} then this pulls through the correct headings are the shop archive and category pages but then does not have a title on the single product pages.

If you make the global header you can use {{dc:archive:title}} which then works correctly on the archive pages. The problem with this is then as soon as you create a second header using {{dc:title}} and assign it to all pages, posts and products so that all those pages show the correct title then the archive/shop category pages no longer use the global header but use the one assigned to all products.

As a result you can’t really make a dynamic header that works reliably across the site.

It would be great if headers could be assigned to archive pages or category pages or at the very least if you are on an archive page and using title it shows nothing rather than the first post in the loop (or at least that what it looks like it shows.)

I understand, thanks for sharing this. As mentioned above, these are all things we need to investigate and will be audited as part of the Layout builder cycle.