Skip Navigation

[Resolved] sub-category view filter

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 4 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1243529

Tell us what you are trying to do?
A simple view that list posts by the sub-category

Category 1
- sub-category 1
- sub-category 2

Views is quite limited when it comes to filter by taxonomies hierarchy, for what i've seen. Yes, it does have a lot of options but when it comes to taxonomy hierarchy, it flaws.

I can't seem to:

- Query filter by parent relationship post that is assigned to the same category or sub-category as the current

OR

- Query filter by other CPT that is assigned to the same SUB-CATEGORY (note: not the parent category)

Am i seeing the wrong picture here?

Sure, i can create a view and target by that specific sub-category, but then i would have to create a view for each one which is not the ideal scenario. When i select to query filter by the same category, it always interprets the parent category.

#1243600

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - as I understand, do you want to group posts by category?

Please check the following article - you need nested views to display the category and post:
=> https://toolset.com/2015/07/how-to-group-posts-by-category/

OR you want:
- Category 1
-- post 1
-- post 2
--- sub category 1
-- post 1
-- post 2

#1243618

Thank you minesh for your time.

Imagine you have 2 different CPT's that share the same taxonomy.

I assign both CPT Posts to the same exact category and sub-category.

So both posts are inside the taxonomy, heres an example:

TAXONOMY BOOK TYPES
- category "books"
-- sub-category "adventure"

I cannot create a view that list all posts only from the sub-category (adventure) that is inside the category books... if i specify in the view query filter to show posts from another CPT that belong to the same taxonomy, toolset will always search for Post under books category (main category) and not adventure (sub-category).

Was this clear? If not please let me know...

#1243619

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

What if you create a page that lists all category and sub-categories and then when you click on that specific category/sub-category term name it will display the term archive page that will eventually list all the posts from all post types.

Does that make sense?

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.