Site logo

[Resolved] Can’t change header element in Woocommerce shop with Health template

Home Forums Support [Resolved] Can’t change header element in Woocommerce shop with Health template

Home Forums Support Can’t change header element in Woocommerce shop with Health template

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1759908
    Daniel

    Hi!

    I have used the Health template from the GeneratePress site library as the basis for a new shop I am starting from scratch.

    The Health template has a page header called Page Headers which I am using on the Woocommerce shop page. I have encountered a problem which is that in the header, it shows Products instead of Shop as the title of the shop page.

    I have also added a tag to the header to show the content of a custom field {{custom_field.subtitulo_pagina}} but on the shop page instead of showing the content of the custom field it shows the tag like this: {{custom_field.subtitle_page}}

    Even weirder, I created another header as a new element just for the shop page to force it to display Shop instead of Products as the title and found it impossible to display the new header on the shop page. I have changed the rules to show it on the shop page, I have disabled the other headers in the Elements section and I can’t get the new header to show on the shop page.

    As shop header I can only use the header that is used by default in the Health template, it doesn’t allow me to change it for another one.

    Any idea what this could be the cause of this?

    #1760677
    David
    Staff
    Customer Support

    Hi there,

    to add a header element to a the Shop you use the Display Rule Location: Product Archive.

    Archive Pages like the Shop don’t natively support Custom Fields – how have you added a Custom Field to it?

    #1761674
    Daniel

    Thanks for your help David!

    I’ve been able to change the header using Display Rule Location: Product Archive. I was trying with Display Rule Location: Shop page and it wasn’t working.

    I added the custom field using ACF plugin. In the Shop page the custom field in the backend was empty, but even so the Shop page in the frontend showed this: {{custom_field.subtitle_page}}. Now I’m using another header for the shop page without the tag {{custom_field.subtitle_page}} so the problem is solved too.

    #1761687
    David
    Staff
    Customer Support

    Yeah – custom fields have to be registered differently for archive pages. One set within the post editor are completely ignored by WordPress.

    Glad to hear you got it resolved.

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