Skip Navigation

[Resolved] Filter wpv-control-post-taxonomy from other wpv-control-post-taxonomy

This support ticket is created 4 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
- 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 8 replies, has 2 voices.

Last updated by davideE-4 4 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1633113

Hi,
it is possible filter the content of a wpv-control-post-taxonomy according to the selection of another wpv-control-post-taxonomy.

Example
If I select the value A from the first field, I have to see the values ​​1,2,3,4,5 in the second field.
If I select B I have to see the values ​​6,7,8,9,10.
Thanks

#1633125

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

No, there is no such feature to implement the dependent filters for taxonomy.

To implement such functionality - You should check this example:
=> hidden link
- Please check “State” and “City” dropdowns with the search form.

Please note that in that case, you need to setup the State and City as custom post types and having one-to-many relationship between State and City CPT.

#1633269

Hi!
it is perfect. How can i replicate into my toolset?
Regards

#1633273

Minesh
Supporter

Languages: English (English )

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

Sorry, I do not understand what you mean. Can you please share more details.

#1633305

Hi,
I saw the example you sent me and it would be perfect in my case.
How should I proceed to create it on my site?

This are my filter now.

<div class="form-group">
<div class="row">
<div class="col-md-6 bootstrap-select-wrapper">
<label for="primo-campo">[wpml-string context="wpv-views"]Primo capo[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="primo-campo" type="select" url_param="primo-campo"]
</div>
<div class="col-md-6 bootstrap-select-wrapper">
<label for="secondo-campo">[wpml-string context="wpv-views"]Secondo campo[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="secondo-campo" type="multi-select" url_param="secondo-campo"]
</div>
</div>
</div>

Thanks

#1633315

Minesh
Supporter

Languages: English (English )

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

As I shared the information with my previous reply:
=> https://toolset.com/forums/topic/filter-wpv-control-post-taxonomy-from-other-wpv-control-post-taxonomy/#post-1633125

Please note that in that case, you need to setup the State and City as custom post types and having one-to-many relationship between State and City CPT.

The primo-campo and secondo-campo needs to setup as custom post type and terms should be added as post. In addition to that you need to create one-to-many relationship between primo-campo and secondo-campo and connect the post.
=> https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/
=> https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/#how-to-connect-related-posts

Once you done that, you can also create a test site on our free test platform http://www.discover-wp.com and create a test site using our reference site and play with it to know how you can setup that State/City filter.
=> https://discover-wp.com/register/?site_type=713&layouts=yes

#1634423

Hi,
thanks for support! My fields are taxonomies and not post type.
Relationships works only with post type?
Regards

#1636865

Minesh
Supporter

Languages: English (English )

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

Relationships works only with post type?
==>
Yes. Thats correct. Toolset offers the post-relationship.

As I shared the detailed with my previous reply:
=> https://toolset.com/forums/topic/filter-wpv-control-post-taxonomy-from-other-wpv-control-post-taxonomy/#post-1633315

If you want such dependent dropdowns, you need to convert your taxonomy to post types and you will require to create a one to many relationships and connect the posts as explained with the above reply.

#1641271

My issue is resolved now. Thank you!