How to filter posts using custom taxonomy?

Posted in: Newspaper
Post count: 45

I use two types of categories for my posts, they are Article Type and Subject categories.
For Article Type I use post categories and for Subject categories I use a custom taxonomy.
How can I use these custom taxonomies in ‘Category Spot’ for normal posts?

Post count: 20688

Hi,

In case of custom post types you can display the taxonomy in the category spot, if that is what you want to do
https://forum.tagdiv.com/custom-post-type-support/
Those are all the settings the theme has for custom post types, most of the settings are created for categories so custom post types don’t have many options.
In blocks or grids you can display CPTs but they cannot be filtered by taxonomy
https://forum.tagdiv.com/block-settings-tutorial/

Post count: 45

Can I use custom taxonomies for normal post type?

Post count: 20688

Default posts can only have categories, maybe by some modifications found online you could add taxonomies to them but the theme may not work with them.
Maybe you can work with categories and sub-categories and create what you want.

Post count: 8

Hi Simion C.

I’ve understood the fact that CPTs can’t be filtered by custom taxonomies in blocks or grids. That said, is there an existing hook or anything that could allow me to add some custom code (without altering future updates) to add filters by custom taxonomies on CPTs in grids/blocks?

Best regards

Post count: 20688

Hi,


@Biznetaucoeur
The blocks/grids are not supposed to handle taxonomies, so there is no functionality to support them. Default categories and tags can be used to filter/sort the posts but not taxonomies. This may change in the future, as this request becomes more popular. Sorry for any inconvenience.

Thanks

Post count: 8

Hi Simion,
Thanks for your answer, I’ll probably “bypass” this functionality using a shortcode to generate similar blocks/grids then.

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.