2 Simple Question (Set Max Post/Display Random Post)
-
OK I have 3 pretty simple problems could somebody please help me:
1. I have the following statement:
‘tag_slug__and’=>array($foo),
How do i change this to search for more than just $foo, say i want to search for $foo and $xyz ??2. I am rewinding my posts, how can i set it to do the following: Display 5 posts max, 5 posts min. On top of this i want it to search for my tags as above and then display random posts for the other if it cannot find any posts? Atm i have this:
<?php rewind_posts();
query_posts(array(
‘cat’=>’1’,
‘tag_slug__and’=>array($foo),
) );?>Now i just need to 1) Set it to display 5 posts
2) Display random posts where it cannot find posts with the tags
- The topic ‘2 Simple Question (Set Max Post/Display Random Post)’ is closed to new replies.