Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mrfoxtalbot opened this issue Jun 3, 2022 · 11 comments
Open

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

mrfoxtalbot opened this issue Jun 3, 2022 · 11 comments
Labels
[Block] Post Terms Affects the Post Terms Block [Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.

Comments

@mrfoxtalbot
Copy link

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

@mrfoxtalbot mrfoxtalbot added [Type] Enhancement A suggestion for improvement. [Block] Query Loop Affects the Query Loop Block [Block] Post Terms Affects the Post Terms Block labels Jun 3, 2022
@mrfoxtalbot
Copy link
Author

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

@adrianoabreux
Copy link

@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.

@mrfoxtalbot
Copy link
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!

@carolinan
Copy link
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.

@mrfoxtalbot
Copy link
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!

@carolinan
Copy link
Contributor

carolinan commented Jun 9, 2022

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.

@mrfoxtalbot
Copy link
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.

@carolinan
Copy link
Contributor

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

@mrfoxtalbot
Copy link
Author

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

@mrfoxtalbot
Copy link
Author

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

@mrfoxtalbot
Copy link
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.

@mrfoxtalbot mrfoxtalbot reopened this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Terms Affects the Post Terms Block [Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants