Skip Navigation

[Resolved] [wpv-control-post-taxonomy taxonomy] – Parent tax only

This support ticket is created 6 years, 5 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by Rémy 6 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1099587

Tell us what you are trying to do?

Search view working well, for this site, still in dev, I only need to display parent WooCommerce taxonomy checkboxes (no WooCommerce child tax) or even exclude some.

Is ti possible with a custom function ?
[wpv-control-post-taxonomy taxonomy="product_cat" type="checkboxes" url_param="wpv-product_cat"]

Is there any documentation that you are following?
Nothing find with this specific subject.

Is there a similar example that we can see?

What is the link to your site?
Search : hidden link
Result : hidden link

Greetings from Quebec,
Rémy

#1099750

Hi, there's not an easy way to filter these terms by hierarchy, but you could use CSS to achieve something similar. Hide all the checkbox labels and turn on specific labels like this:

.page-boutique-categorie .mainContent .checkbox label {
    display: none;
}
.page-boutique-categorie .mainContent .checkbox label[for="product_cat-25ieme-anniversaire"] {
    display: block;
}
.page-boutique-categorie .mainContent .checkbox label[for="product_cat-bijoux-anciens"] {
    display: block;
}

It's not automatic, but it could work well if your parent terms do not change much over time.

#1100540

Thanks Christian.

Already tried the CSS alternative, not effective enough.

I made an hybrid soltuion, a little bit of Toolset and more of WP get_terms/get_term_children, plus Bootstrap collapse for show/hide child.

Bottom left column : hidden link

Next challenge, filter range price 😉

Cheers