Category Posts Filters & Tag Filters via dropdown menu
-
I have the need to preform post filtering over various posts and tags.
I made visual example to help demonstrate what I’m trying to do1) Basically I’ve got a page that I only display posts from specific categories.
<?php query_posts("cat=7,4,8"); ?>
I would like to have the posts display under their respective categories (I.E. under their titles…see screen). I can do this manually by making a query posts for each category, but this is not that efficient as it requires more code and manual effort each time I add a new category to the list. Is there a more efficient way of querying posts and having the result separate the posts based on category? If not I will go with the other.2) I would like to add filtering to the mix as well. I would like to have the user be able to select/filter (via link or dropdown) by category and by tag. So, if the user selects cat-1 all posts from cat-1 are displayed. So then if they select tag-1 all posts are shown from cat-1 and tag-1. Seems to me this would need to be accomplished by creating a lot of pages with the desired results already populated on them. However, if there is a way to do this using the same page template, using if statements, and some clever PHP I am all for it.
Thanks in advance
- The topic ‘Category Posts Filters & Tag Filters via dropdown menu’ is closed to new replies.