• Hello, I have trouble randomizing my posts. I have googled all around and looked for plugins, but don’t know how to fix this.

    I used to get this working with the following code:

    [please read http://codex.ww.wp.xz.cn/Forum_Welcome#Posting_Code for posting code]

    <?php query_posts($query_string . '&orderby=rand') ?>

    But with the theme I’m now using it won’t work, I don’t really know why…

    The index.php shows this:

    <?php get_header(); ?>
    			<?php get_sidebar('top'); ?>
    			<?php
    			if (have_posts()) {
    				/* Display navigation to next/previous pages when applicable */
    				if (theme_get_option('theme_' . (theme_is_home() ? 'home_' : '') . 'top_posts_navigation')) {
    					theme_page_navigation();
    				}
    				/* Start the Loop */
    				while (have_posts()) {
    					the_post();
    					get_template_part('content', get_post_format());
    				}
    				/* Display navigation to next/previous pages when applicable */
    				if (theme_get_option('theme_bottom_posts_navigation')) {
    					theme_page_navigation();
    				}
    			} else {
    				theme_404_content();
    			}
    			?>
    			<?php get_sidebar('bottom'); ?>
    <?php get_footer(); ?>

    What would be the best way to randomize it with this index.php

    Many thanks!!

Viewing 1 replies (of 1 total)
  • Thread Starter chokolademan

    (@chokolademan)

    Or could anyone point me to the right direction of a plugin to accomplish this?
    But a suggestion for the code is also still welcome 🙂

Viewing 1 replies (of 1 total)

The topic ‘Randomize posts problem’ is closed to new replies.