This is the code:
<?php get_template_part( 'pagination', 'bbp_replies' ); ?>
<?php query_posts('gdsr_sort=thumbs&post_type=bbp_reply&posts_per_page=2'); ?>
<?php while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
<?php while ( bbp_replies() ) : bbp_the_reply(); ?>
<div class="topic-entry">
<div class="topic-author">
<?php bbp_reply_author_link( array( 'type' => 'avatar' ) ); ?>
<?php bbp_reply_author_link( array( 'type' => 'name' ) ); ?>
<?php printf( __( '%1$s', 'bbpress' ), get_the_date() ); ?>
</div>
<div class="topic-content">
<?php bbp_reply_content(); ?>
<span class="like-counter"><?php DisplayVotes(get_the_ID()); ?></span>
</div>
<?php bbp_reply_admin_links(); ?>
</div>
The first query_posts
loop list the 2 most voted replies. The second bbPress loop list all other replies in DESC order.
Will I encounter bugs if I have these two loops in a same file template?