Skip to content

[Post Categories block] Include Support for Custom Taxonomies #41541

Closed

Description

@mrfoxtalbot

What problem does this address?

The Query Block lets you select the custom post type you want to query... but the way the Post Categories block works at the moment, unless that CPT is associated with the default taxonomies (categories and tags) it will show a "No categories message".

Screen Shot on 2022-06-03 at 15:51:19

This is not a bug in the Post Categories itself, but it can be confusing for users who expect the Post Categories block to just list all/any relevant terms coming from custom taxonomies.

What is your proposed solution?

My suggestion would be to add a dropdown in the Post Categories block to select which taxonomy we want to show terms for.

Screen Shot on 2022-06-03 at 16:09:15

Activity

  1. mrfoxtalbot commented on Jun 4, 2022

    @mrfoxtalbot
    Author

    I have found a block that already does exactly what I described: Taxonomy Terms List Block.

  2. adrianoabreux commented on Jun 4, 2022

    @adrianoabreux

    @mrfoxtalbot did the plugin you mentioned works for pages? I tried adding it to a page query loop, but it does not show my custom "negócio" taxonomy.

  3. mrfoxtalbot commented on Jun 4, 2022

    @mrfoxtalbot
    Author

    Hey, @adrianoabreux. I did a quick text to a associate a custom taxonomy to the default (core) pages and the Taxonomy Terms List Block does seem to list the terms correctly.

    Screen Shot on 2022-06-04 at 19:43:56

    I hope that helps!

  4. carolinan commented on Jun 9, 2022

    @carolinan
    Contributor

    Since the different taxonomies are variations of the post term block, would it make sense to display them as well, variations, instead of a sidebar option?

    Aside: It should be possible to transform to a different variation.

  5. mrfoxtalbot commented on Jun 9, 2022

    @mrfoxtalbot
    Author

    would it make sense to display them as well, variations, instead of a sidebar option?

    I am not sure what you mean here @carolinan. What would this look like? Are you referring to having a single Post Taxonomy block and use it for categories, tags and custom taxonomies?

    Thank you!

  6. carolinan commented on Jun 9, 2022

    @carolinan
    Contributor

    It is already a single block. I meant if you place a post categories block, it would have an option further up in the sidebar,
    just like if you place a group block, you can choose between group, stack, row:

    image

    And custom taxonomies would have some sort of generic icon.

  7. mrfoxtalbot commented on Jun 13, 2022

    @mrfoxtalbot
    Author

    Thank you for the details @carolinan. That could work too, sure. My goal when I opened this issue was not so much to pursue any specific path, but to address the fact that the current state of FSE does not offer any way to include/list custom taxonomies.

  8. carolinan commented on Jun 13, 2022

    @carolinan
    Contributor

    It does, but it is a recent change: #39837

  9. mrfoxtalbot commented on Jun 13, 2022

    @mrfoxtalbot
    Author

    I wasn't aware of that PR. Thanks again @carolinan. We. An mark this as solved, then, I think.

  10. mrfoxtalbot commented on Jun 13, 2022

    @mrfoxtalbot
    Author

    There's a fix on its way @adrianoabreux, please check #39837

  11. mrfoxtalbot commented on Dec 19, 2024

    @mrfoxtalbot
    Author

    I have noticed this issue is still reproducible. I am not sure if this is a regression of of if it was never fixed (#39837 says it was merged, though).

    I am going to reopen this.

  12. Mamaduka commented on May 1, 2025

    @Mamaduka
    Member

    Closing this as resolved. The block variations can be switched for available taxonomies.

    Screenshot

    Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions