Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Product Category Name as dynamic content in elements

  • I am playing around with dynamic content – and I wanted to get the product category name in a block element – I could not see how with dynamic content block but when adding in HEADLINE and adding dynamic data > list of terms – I can see that its looking for taxonomy – but I was expecting category in there and its not – am I wrong??

    I can get description but its actually the name itself I am after – the design calls for some tweaking of the layout for the woo category pages and I am trying to see if I can hide standard ones and display my own in the right section

    Also location wise I am using hook and archive_description – but I am unsure if that is correct either! Sorry bit of a mess!

    Any ideas or is it not possible?

    thank you
    Sarah

  • Hi there,

    List of terms is used for the single post type, so single product in your case, it does not work on archive pages.

    And in the block element environment, the current post is the element itself and it does not have category taxonomy.

    Let me know if I miss anything!

  • Thank you Ying – so does that mean I am not able to create a dynamic element that displays the product category ?

  • Hi there,

    if you want to display the title of the current archive:

    1. add a GB Headline block,
    2. don’t use the GB dynamic data in the block settings sidebar.
    3. instead use the legacy GP Dynamic Data options in the blocks toolbar to set the TITLE:
    https://docs.generatepress.com/article/dynamic-data/#title

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