WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Random order of posts at home

[Resolved] Random order of posts at home

  • Hi,

    I would like set my posts at a random order instead of the date (ignoring the date).

    This is the code from my theme:

    <?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); $i++; ?>
    <div class=”span-8 post-<?php the_ID(); ?><?php if ($i == 3) { ?> last<?php } ?>”>
    <h6 class=”archive-header”>” rel=”bookmark” title=”<?php the_title_attribute(); ?>”><?php the_title() ?></h6>
    <?php get_the_image( array( ‘custom_key’ => array( ‘thumbnail’ ), ‘default_size’ => ‘thumbnail’, ‘width’ => ‘310’, ‘height’ => ‘150’ ) ); ?>
    <?php the_excerpt(); ?>
    <p class=”postmetadata”><p class=”postmetadata”><?php the_tags(); ?></p>
    </div>
    <?php if ($i == 3) { ?><div class=”archive-stack clear”></div><?php $i = 0; } ?>
    <?php endwhile; endif; ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Random order of posts at home’ is closed to new replies.
Skip to toolbar