Viewing 3 replies - 1 through 3 (of 3 total)
  • hello, maybe this will help a little, because I do not remember well: for example I used the following to show just 1 category entries randomly
    query_posts (‘cat =’ $ category ‘& posts_per_page = 4 & orderby = rand’..);

    Thread Starter rajaram.sethuraman

    (@rajaramsethuraman)

    thanks for the reply. But do i change this in content.php by adding a new query?

    icarorio

    (@icarorio)

    I honestly do not know where to put this code does not work in the files that I imagine (functions.php and arquive.php).
    Would you like to view the posts at random, as they are many.
    In arquive.php, used the following code on line 16:
    <?php query_posts(“orderby=rand”); ?>
    But he also randomizes the categories. That is, if I’m displaying the music category, it displays randomized posts of all other categories. But I want to randomize only posts the current category …

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Random posts on the blog page’ is closed to new replies.