WordPress.org

Support

Support » Plugins and Hacks » Query Multiple Taxonomies » [Plugin: Query Multiple Taxonomies] Is there a way to hide the children term's of each parent t

[Plugin: Query Multiple Taxonomies] Is there a way to hide the children term's of each parent t

  • I have a taxonomy of “age”, with parent terms of as age groups (18-25) and child terms (18,19,20,21,22,23,24,25) within each age group parent. I figured this would be a good way to have some sort of age range.

    In the actual dropdown that is displayed on the front-end, is there a way I could hide the children so it only displays the parent terms? So I only see 18-25.

    I tried using CSS to hide the level-1 class but it doesn’t work so great with webkit browsers. Any have any ideas? thanks!

    http://wordpress.org/extend/plugins/query-multiple-taxonomies/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hmm, perhaps a walker? I have no clue how to write one, but just reading through your code in walkers.php suggests this would be a possible solution. I’d need to just modify the “age” taxonomy somehow and remove the children from the dropdown.

    Hello.
    I am very interested in resolving this issue.
    How can I hide the children term’s when they are not active?

    Ok … I found a solution … perhaps rudimentary but it works:)
    I edited the file “list-item.html” inside the folder “templates”:

    <li class="term-item {{#is-selected}}current-term{{/is-selected}}">
    	{{#is-selected}}
    		<a class="remove-term" href="{{url}}" title="{{title}}">{{term-name}} ({{count}}) -</a>
    	{{/is-selected}}
    	{{^is-selected}}
    		<a class="add-term" href="{{url}}" title="{{title}}">{{term-name}} ({{count}}) +</a>
    	{{/is-selected}}
    	{{#is-selected}} <!-- Mod -->
    	{{#children}}
    		<ul>
    			{{{child-list}}}
    		</ul>
    	{{/children}}
    	{{/is-selected}} <!-- /Mod -->
    </li>

    And do you know how can i hide the children terms if i am using dropdowns?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Query Multiple Taxonomies] Is there a way to hide the children term's of each parent t’ is closed to new replies.
Skip to toolbar