WordPress.org

Ready to get started?Download WordPress

Forums

post random (2 posts)

  1. zinc1314
    Member
    Posted 11 months ago #

    Hi everybody!

    I have this code

    <?php while(have_posts()): the_post(); ?>
            <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

    And i can't do random posts. Someone can help me please?

    thanks

  2. zinc1314
    Member
    Posted 11 months ago #

    sorry, i have this code now

    <?php $home_query = new WP_Query("cat=&showposts=8&orderby=rand"); $i = 0; ?>
    		<?php while ($home_query->have_posts()) : $home_query->the_post();
    $do_not_duplicate = $post->ID; $i++; ?>

    But with AStickyPostOrderER plugin, make random but only with sticky category.

    Some solution?

Reply

You must log in to post.

About this Topic