• first I want to thank you for this great plugin.

    I am unable to list the top rated post by category.
    I am a layman in code if anyone can help me I will be grateful.

    This is the part that I’m using, it shows the most votes overall,

    <?php $segunda_consulta = new WP_Query(
        array(
    		'posts_per_page' => 6,    // Apenas 6 posts
    		'r_sortby' => highest_rated,    // Ordem
        )
    );
    ?>
    
    <section id="categorias-relacionadas"><div class="container"><p></p></div> <!--/container--></section>
    <section id="melhores-filmes">
    <h2 class="tt">
    <span class="container"> Os melhores <b>filmes de   Aventura</b> </span></h2>
    <div id="galeria-melhores-filmes">
    <div class="container">
    <div class="content">
    
    <?php $numerado = 1; {query_posts('=r_orderby=desc&ignore_sticky_posts=1'); while ($segunda_consulta->have_posts() ): $segunda_consulta->the_post(); ?>
    
    <div class="box-video-destaque">
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
    <img alt="<?php the_title(); ?>" class="thumb" height="202" width="153" <?php if ( has_post_thumbnail()) {$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large'); echo get_the_post_thumbnail($post->ID, 'large'); }?>
    </a>
    
    <p class="nota">
    <span><?php if($values = get_post_custom_values("imdbRating")) { ?>
    <?php echo $values[0]; ?></span>
    <?php } ?>
    </p> 
    
    <a class="btn-trailer" href="http://www.filmesonline2.com/frozen-uma-aventura-congelante-1080p/">Ver Trailer</a>
    </div>
    <?php $numerado++; ?>
    <?php endwhile; ?>
    <?php } ?>
    <?php wp_reset_postdata(); ?>
    
    </div>
    </div>
    <?php wp_reset_postdata(); ?>
    </div>
    </section>

    I need a code to display by category.

    if someone can help me.

    https://ww.wp.xz.cn/plugins/wp-postratings/

The topic ‘top rated loop by category’ is closed to new replies.