Site logo

[Support request] Difference in location rules

Home Forums Support [Support request] Difference in location rules

Home Forums Support Difference in location rules

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1873104
    Paul

    Hi,

    What’s the difference between post category, post tag and post category archive, post tag archive?

    Is there a document that describes each location and where an element would apply front-end?

    Thanks,
    Paul.

    #1873225
    Ying
    Staff
    Customer Support

    Hi Paul,

    The terms like post category/tag, archives are actually defined by WordPress, it’s not a GP thing.

    In WordPress, the term ‘Archives’ is used for a list of entries from a post type or taxonomy (like categories and tags).

    The post category/tag applies to the single post that belongs to this specific category/tag.

    Here’s a visual hook guide for all GP hooks:
    https://docs.generatepress.com/article/hooks-visual-guide/

    Let me know if you need further assistance 🙂

    #1873515
    Paul

    Hi Ying,

    I understand the terms are defined by WordPress, I just couldn’t get a test block to display using ‘category’ or ‘tag’ on a single post. Archives are no problem.

    It’s not an issue if I won’t need them, I was just trying to understand the trigger.

    Thanks,
    Paul.

    #1873565
    Ying
    Staff
    Customer Support

    As you can see, there’s a bold title for each section to indicate it’s for posts or archives:
    https://www.screencast.com/t/q2iVf3RXRXYw

    Can you tell me which hook you are using for the single post and it doesn’t work?

    Let me know 🙂

    #1886476
    Paul

    Hi,

    As an example – I have dummy post setup in ‘Example Category A’. Create a block element, page hero, add dynamic text ‘term meta’, and meta field name ‘category’. Hero displays but without text.

    Tag and author archive heros seem fine, category I’m getting something wrong on.

    That said, I still don’t understand the difference between ‘post category’ and ‘post category archive’ as a location.
    Same for ‘post tag’ or ‘post tag archive’, although I have tag heros displaying ok.

    Thanks,
    Paul.

    #1886496
    Ying
    Staff
    Customer Support

    The location means where you want the element to display.

    For example, if you choose post category > example category A, the element will display in single posts which belong to example category A.

    If you choose post category archive > example category A, the element will display in the archive page of example category A.

    As an example – I have dummy post setup in ‘Example Category A’. Create a block element, page hero, add dynamic text ‘term meta’, and meta field name ‘category’. Hero displays but without text.

    Trylist of terms > categoryinstead.

    Here’s a list of dynamic-content-related videos, hope it will help you to understand the concept better:
    https://www.youtube.com/c/GeneratePress/search?query=dynamic

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