Sauter la navigation

[Résolu] Don’t show child categories in view

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I have a View of a hierarchical taxonomy. All the terms in the taxonomy are displayed in the View, but I want to show only the top-level terms. No child terms should be shown.

Solution: Use a term parent Query Filter set to parent term is "None". This will show only top-level terms.

Relevant Documentation:
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/

This support ticket is created Il y a 6 années. 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)

Marqué : ,

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par matthewL-7 Il y a 6 années.

Assisté par: Christian Cox.

Auteur
Publications
#1200137

Hi

I have a view that lists all the categories on my wordpress site.

You can see the page here: lien caché

However I only want it to list parents, not any children of categories.

How can I do this? Is this possible?

Thanks.

#1200219
Screen Shot 2019-02-13 at 3.04.20 PM.png

Hi, yes, you can add a Query Filter by taxonomy parent, where the parent is "None". This will show only the top-level terms (no child terms) in a hierarchical taxonomy. See the screenshot here. If you cannot find the Query Filter panel, scroll to the top right corner and click "Screen Options" to activate it.

#1200417

That’s great works perfectly. 🙂