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.

GB2.0 dynamic data from term list only show the first term

  • I’m building new site using the new GP site template library, and I’m creating custom post named “Direktori” with term “Kategori Lembaga” to make category out of it.

    In my “Directory” archive page, the list term only showing the first term matching with query loop. It should be showing all the category instead of one.

    Here is the picture of Direktori archive.

    It should be look like blog archive with Category one and Category two loaded in the side bar.

    Instead it only load the first terms, see it at Direktori archive.

  • Hi there,

    The Term List dynamic tag only displays terms assigned to the current post. Since the “current post” in your case is an archive page, the term list may not display correctly.

    Alternatively, you can try using the core Terms List block.

  • Core Terms List Block are the same, not working, only load the first term.

    How could it be different in behaviour

    In “Blog archive”, they load all the Terms, see Blog archive picture.
    In “Direktori archive”, only the first Term see Direktori archive picture.

    Could it be the “blog” page getting special treatment/instantiation because it was set as Posts page in the Settings > Reading > Posts page …

    Hmm.. I’ll look around then.

    Anyway do you have any more idea for me to try?

  • I’m not sure what you are trying to pull via the list of terms on an archive page.

    Are you trying to pull all terms of category for the archive page?

    If so, try WP’s categories list block, but it might show all categories that you have, no matter if it’s a CPT archive or a regular blog.

    If you only want to show the category terms that’ve been assigned to this CPT, you will need custom coding for that.

  • I’m trying to replicate something like this.
    Using the same GB text element but showing all the terms available, just like the “Loop – Blog and Archives (Loop Template)” but implement it to “Loop – Direktori Archives (Loop Template)”.

    Yes the WP’s Categories list block works, but then I need to write separate css for custom style. This would be my last resort.

    I prefer using GB block, So any more ideas guys?

  • I don’t think there’s a solution for that at the moment with GB blocks. Alternatively, you could write a custom function to query the list of categories and output it using a shortcode. Since custom code is already involved, it might be simpler to use the core Categories List block and apply custom CSS to match the site’s existing styles.

  • Ok then. Last resort it is.

    Thanks Alvin and Ying.

  • You are welcome   🙂

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