Im currently working on my own theme and i have a custom post type i created called “Articles” and i have also created two taxonomies for it, “Article Categories” and “Article Tags”. The reason i have done this is to keep my articles categories and tags completely separate and independent from the default wp categories and tags.
My question is how can i query posts based on whichever categories or tags are created on the fly through the admin panel?
If you load this link, http://wp.pulsarmedia.ca/starlight/?page_id=194, you will be directed to the “Articles” page on my site. You will notice that the first article is posted in “Mars”. When i click on “Mars” i get directed to my custom taxonomy template file (taxonomy-articlecategory.php) and this page needs to fetch all of the articles that are grouped in the same category – in this case “Mars”.
So again, how can i query all posts from the database that are grouped in the category “Mars”? is there a specific argument i need to pass in to the query_post method that will fetch the data based on this criteria?
I am fairly confident if reading this correctly that all you need to do at this point is use a proper function to list what you want… the query was done…
yes, i need to fetch all “Article” posts that are grouped in their specific categories (which can be created dynamically by the user through the admin panel). Does this require a custom SQL query to achieve? or is it simply a matter of passing in a specific argument into the query_posts method?
I was being quite generic in my answer based on the information provided. Without working code links (Pastebin) or more information, I am confident even well know web dev’s will have little to respond to..
nevermind i figured it out
Sorry to have bothered you with your request for help on the forum???
- The topic ‘Querying posts based on a single category or tag’ is closed to new replies.