WP_Query not retrieving by random order under parent

I currently have TWO subpages under parent page ID 43. Client testimonials.. Anyway. I have the random order thing in the query $args but the order never changes. What could I be missing?

wp_reset_query();
$args=array(
  'post_parent' => 43,
  'post_type' => 'page',
  'post_status' => 'publish',
  'posts_per_page' => 2, 
  'orderby'=>'rand'
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post();
    ?>
    <h4><? echo get_post_meta($post->ID,'subtitle', true);?></h4>
    <p><? echo get_the_excerpt(); ?></p>
    <?
    endwhile;
}
wp_reset_query();  // Restore global post data stomped by the_post().

Related posts

Leave a Reply

1 comment

  1. Turns out the “Custom Page Order” plugin was causing the randomization error… or rather, not allowing any randomization as it overrides it completely. Disabled the plug-in.

    Whenever I need to change orders, I can enable the plugin, shuffle pages around, and then disable. But the need for this is decreasing more and more as we now have custom menu options in WordPress.