[Plugin: WP-Filters] List Display Issue Categories and Subcategories
-
Impressive plugin!
I would love to use it but there is a little problem about it.
The thing that bothers me is the big list of unordered categories and subcategories being displayed all the time in one line, regardless of selected category.
I have more than 30 categories including subcategories, so having this unordered list of “all of them” at all the time is a bit annoying.
The way I see it as best solution would be to display only “subcategories” of CURRENT selected category or all available categories/subcategories of current loop.
example:
If the selected category or the loop is “Category 1”, then to display as filter options all and only subcategory 1,2,3 of Cat 1 or current loop. If the loop is “custom taxonomy” or even master loop then to display only all available categories without subcategories.Here is a peace of code I found to display only all available subcategories of selected category:
<?php if (is_category()) { $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { echo "<h1>SUBCATEGORIES</h1>"; echo "<ul>"; wp_list_categories('orderby=id&show_count=0&title_li= &use_desc_for_title=1&child_of='.$this_category->cat_ID); echo "</ul>"; } } ?>
Hope it can be modified and implemented, but if not, at least to have them ordered and displayed in proper way would be a great solution and it would make so many users happier. For example:
Category 1
– Subcategory 1
– Subcategory 2Category 2
– subcategory 1
– subcategory 2
etc…Hope u find this helpful and useful.
Cheers!
- The topic ‘[Plugin: WP-Filters] List Display Issue Categories and Subcategories’ is closed to new replies.