Show ALL posts for a particular category in random order on a page

/ Published in: PHP
Save to your folder(s)

Here is the code I used to show all of the posts for a particular category...

Copy this code and paste it in your HTML
  1. <?php query_posts('category_name="Your Category Name"&orderby=rand&posts_per_page=-1'); ?>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.