WordPress Popular Posts
Most Popular Section with WPP Plugin - Implementation? (1 post)

  1. guitargeek_com
    Posted 1 year ago #

    Hello WPP,

    I'm displaying a Popular Post Section that is sorted by the most Comments. I'd like to integrate WPP and display the posts by Page Views. I'm running up against formatting and CSS styling issue when using WPP.

    Here's the current code for the "Popular" posts:

    <!-- Most Popular  -->
    	<div class="middle_col">
    	<h5>Most Popular</h5>
    		<?php $pc = new WP_Query('orderby=comment_count&posts_per_page=10=&cat=8'); ?>
                             <?php while ($pc->have_posts()) : $pc->the_post(); ?>
    			 $thetitle = $post->post_title; /* or you can use get_the_title() */
    			 $getlength = strlen($thetitle);
    			 $thelength = 42;
    	                            <li style="list-style: none;"><div class="thumbnail-small"><?php the_post_thumbnail(); ?></div><span class="title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php echo substr($thetitle, 0, $thelength); if ($getlength > $thelength) echo "..."; ?></a></span><br />
    		<span class="meta">
                               <?php comments_popup_link('No Comments Yet', '1 Comment', '%  Comments'); ?></span></li>
                                       <?php endwhile; ?>
    <!-- // Most Popular -->

    What do I need to change in order to make this work with WPP?

    I'm guessing the following bits of code need to be changed in order to work:

    <?php $pc = new WP_Query('orderby=comment_count&posts_per_page=10=&cat=8'); ?>


    <?php comments_popup_link('No Comments Yet', '1 Comment', '% Comments'); ?>

    The site is at http://www.guitargeek.com

    Any help appreciated...



Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Popular Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic