[Resolved] Template Tags in Elements not showing up

Home Forums Support Template Tags in Elements not showing up

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #1139789
    Aldrin

    Hi, I have setup an element and asigned it to the right area to show. Within the element I used Template Tags…Issue I’m having is {{post_title}} shows up correctly…for example “Example Title”, but anything like {{post_author}} or {{post_terms.taxonomy}} etc shows up exactly as {{post.whatever}} in brackets. Can someone shed some light if there is there is some specific settings to display other tags correctly?

    #1139801
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the site in question?

    You can edit the original topic and use the private URL field.

    Let me know 🙂

    #1139804
    Aldrin

    Hi Leo, I’m actually running the site locally. I think I might be trying to achieve something which might not be supported with this feature. The element I have created is set to show on woocommerce product category archive pages. For example /product/cars/bmw/ … I wanted to have the word BMW show on the products under/product/cars/bmw/ category archive page. Hope I am being clear enough.

    #1139993
    David
    Staff
    Customer Support

    Hi there,

    {{post_author}} should work on any single post displaying the byline.

    To display the post categories you would use: {{post_terms.category}}

    #1140434
    Aldrin

    Hi David, thank you but I already mentioned that I did try {{post_terms.category}} in the archive sections and it still shows up exactly as {{post_terms.category}}. So, I created an Element, next I added {{post_terms.category}}, then in Display Rules > Location I specified Product Category Archive -> All Product Categories. No luck

    #1140440
    David
    Staff
    Customer Support

    Sorry missed the woocommerce part – so you need this:

    {{post_terms.product_cat}}

    #1140620
    Aldrin

    Thanks again David…I did try that before {{post_terms.product_cat}}…still no luck

    product tag

    #1140810
    Tom
    Lead Developer
    Lead Developer

    Hmm, it’s not trying to render at all.

    Does this work on a regular post using {{post_terms.category}}?

    If not, can you try deactivating your other plugins to rule out a conflict?

    #1147340
    Aldrin

    Hi Tom, sorry for the delay. I even tried installing a fresh WPress and theme files and GP Prem plugin. Out of laziness I did import the demo content. I still see the bracketed values instead of the correct values. None of them work, except for {{post_title}}

    #1147413
    David
    Staff
    Customer Support

    Can you share the exact HTML you have in the Header Element ?
    When adding code to the forum, please highlight and hit the Code button before submitting

    #1147468
    Aldrin

    Hi David, here you go. {{post_title}} Testing {{post_terms.category}} or {{post_terms.product_cat}}

    #1147608
    David
    Staff
    Customer Support

    Tricky to diagnose the problem without seeing the site.
    Any chance it can be pushed to a hosted environment ?

    #1147661
    Aldrin

    Sure David…How would I forward you the credentials to the site?

    #1147689
    Leo
    Staff
    Customer Support

    You can send the dashboard access using Account Issue here:
    https://generatepress.com/contact/

    Please include the following information:
    – The URL of this topic.
    – Login URL.
    – Username and password.

    #1150196
    David
    Staff
    Customer Support

    Oops we may have missed the obvious in this topic:

    {{post_terms.taxonomy}} eg, {{post_terms.product_cat}} cannot be used on Archives. As that would be the same as the {{post_title}}

    If you change your display rules to the Product > All Products then you will see the Title and the Terms displayed on all products.

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