query_post and combination of cat tag
-
Hello all,
thanks to anyone that can help me to solve this loop.
Basically I want to select posts that have:
– a specific category
AND
– a specific tag
– to be shown randomly
– max 6 postsAt the moment I’m using this code:
<?php query_posts('cat=3&tag=test&orderby=rand&showposts=6'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
It doesn’t work as expected…it only shows results if I use “cat” or “tag” but not in combination…
I’m not sure if query_post() is the best solution in order to filter posts that have a combination of “cat” AND “tag”.
What do you suggest?
Thanks in advance for your help.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘query_post and combination of cat tag’ is closed to new replies.