[Resolved] How to display category link on page hero?

Home Forums Support [Resolved] How to display category link on page hero?

Home Forums Support How to display category link on page hero?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1046122
    Kemo

    hi!

    I’d like to display a category link on a page hero, I tried this:

    <h1 class="header">
    	{{post_title}}
    </h1>
    {{post_author}} | {{post_date}} | {{post_category}}

    But apparently post_category doesn’t work like that. Is there a list of these variables that work on post hero?

    I don’t have a website to show as I’m working on a staging server.

    thanks

    #1046125
    David
    Staff
    Customer Support

    Hi there,

    you use the {{post_terms.taxonomy}} template tag so to display category you would add:

    {{post_terms.category}}

    #1046131
    Kemo

    thank you! is there a list of these somewhere?

    #1046132
    David
    Staff
    Customer Support

    In the header element there is a small meta box displaying the top level ones. And this doc explains more:

    https://docs.generatepress.com/article/header-element-template-tags/

    #1046146
    Kemo

    again, thank you David

    #1046195
    David
    Staff
    Customer Support

    You’re welcome

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