WordPress.org

Ready to get started?Download WordPress

Forums

GD Star Rating
Possibly to show top 10 posts by number of Views? (2 posts)

  1. bgajus
    Member
    Posted 3 years ago #

    Is it possible to build a template to display the top 10 posts by number of post views?

  2. Treebeard
    Member
    Posted 3 years ago #

    Something like should work, just add that first line above the Loop (example below):

    <?php query_posts("gdsr_sort=rating&sort_order=asc&showposts=10"); ?>
    <?php if (have_posts()) : ?>
    							<?php while (have_posts()) : the_post(); ?>
    								<?php include (TEMPLATEPATH . "/item.php"); ?>
    							<?php endwhile; ?>
    							<?php else : ?>
    								<?php include (TEMPLATEPATH . "/missing.php"); ?>
    							<?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic