Skip Navigation

[Resolved] Filtering images with checkboxes in another view not filtering

This support ticket is created 3 years, 6 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by Luo Yang 3 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2283901

I have a bunch custom post types that fit into certain categories. I want to show checkboxes of these category. When these are selected and submitted, the page reloads showing only the featured images of the custom post types in these selected categories.

I basicly wanted something similar to what this person asked.
https://toolset.com/forums/topic/filter-by-category-2/

I followed this explenation. With me however everything works, except the filtering. It is showing all CPT no matter what I select... I double checked all the steps several times. I think the problem lies in the third toolset view "wpv-view name="network-sites-categories"" in the example code in the link. It's not getting the selected views and is showing all of them.

#2284099
Knipsel.JPG

So maybe I should explain further... (can't edit anymore)

Basicly I want to build something like this (see pic). I want checkboxes on the left, if one or several are checked the relevant products show on the right (featured image).

I have 1 CPT for all my products. Every post in it is a different product. This CPT has several categories, every product/post has 1 or several categories. I want these categories listed as checkboxes on the left. If I press a submit button, all checked categories show their products on the right. (No doubles if they are in two or more categories).

I need to do it with category's or something else that easy. The user needs to be able to easily add and remove menu items.

The link in the post above got me the menu on the left but now I'm stuck.

#2285451

Hello,

How do you setup the post type relationship between CPT and product?
Are we talking about this case:
Two post types:
- CPT (with taxonomy "categories")
- product
Many-to-many relationship between above post types

You are going to setup a view:
- Query product
- Filter by taxonomy "categories" of another post type "CPT"

If it is, there isn't such kind of built-in feature within Toolset Blocks plugin.

Toolset Blocks plugin is using WordPress class WP_Query to query posts, you can only filter the results by the taxonomy of same post type, you can not filter the result by taxonomy of another post types.

So you might consider to move the taxonomy "categories" into post type "product".

More help:
https://toolset.com/course-lesson/creating-a-custom-taxonomy/