How to display results from a particular category on webpage
-
I have something like this:
<?php query_posts(‘cat=10’); ?>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>But furthermore to the above code I want to add a WHERE statement so that the loop returns ONLY values that belong to a certain category. This is a CMS so I don’t know what the second category number is going to be. So essentially I have two categories. One which I have hard-coded and is already known. Second,I will be using info from the address bar to filter what is displayed on the page.. So a further filter to the above code. So perhaps a where statement somewhere inside the while loop.
- The topic ‘How to display results from a particular category on webpage’ is closed to new replies.