Why is that gdsr_sort=thumbs (GD start rating plugin) only works with query_posts and not with WP_Query?

This correctly sort posts by thumbs vote (GD star rating plugin):

<?php query_posts('gdsr_sort=thumbs&post_type=bbp_reply&posts_per_page=2&post_parent='.$post->ID); ?>
<?php while ( have_posts() ) : the_post(); ?>
    <h2><?php  the_title(); ?></h2>
    <?php the_content(); ?>
<?php endwhile; ?>
<?php wp_reset_query(); ?>

But this doesn’t sort them at all:

        <?php $custom_posts = new WP_Query(); ?>
        <?php $custom_posts->query('gdsr_sort=thumbs&post_type=bbp_reply&posts_per_page=2&post_parent='.$post->ID); ?>
        <?php while ($custom_posts->have_posts()) : $custom_posts->the_post(); ?>
            <div class="content-block-2">
                    <?php bbp_reply_author_link( array( 'type' => 'avatar' ) ); ?>
                    <?php bbp_reply_author_link( array( 'type' => 'name' ) ); ?>
                <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
            <?php the_content(); ?>

            </div>
        <?php endwhile; ?>

Related posts

Leave a Reply

2 comments