< Buzzing or vibrating the login form using jquery Posted On May 15, 2012 : 0 comments << >> Simple div slideshow using jquery Posted On May 9, 2012 : 0 comments << >> Copy mysql column in varchar to type date Posted On May 3, 2012 : 0 comments << >> Enter only numbers inside a input field of a form using javascript Posted On May 1, 2012 : 0 comments << >> Slide in and out animate div vertically using jquery Posted On April 25, 2012 : 1 comment << >> Tag cloud using php, mysql and ajax with filter Posted On April 24, 2012 : 0 comments << >> Change webpage font color or background color from the user side using javascript Posted On April 19, 2012 : 0 comments << >> A single link that cycles through several webpage background color using javascript Posted On April 17, 2012 : 0 comments << >> Simple webpage redirection using perl script Posted On April 10, 2012 : 0 comments << >> Get ipaddress using perl script Posted On April 4, 2012 : 0 comments << >>

How to display popular posts in wordpress

This Tutorial Has Been Viewed 2,376 Times.
VN:F [1.9.17_1161]
Rating: 7.5/10 (2 votes cast)

I came across different wordpress themes where they wont provide the popular post catogory, so this a simple tip to help you guys regarding the addition of how to display popular posts in wordpress themes.Usually the SIDEBAR.PHP is the is the best area where we can put this code.Its very simple just add the code i have given below,

  1.  
  2. <h3>Popular Posts</h3>
  3.  <ul>
  4. <?php query_posts(‘category_name=php&showposts=10′); ?> 
  5. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> 
  6. <li><a href=”<?php the_permalink(); ?>”>
  7. <?php the_title(); ?></a><br /> <?php the_excerpt(); ?>
  8. </li> <?php endwhile; ?>
  9. <?php endif; ?> 
  10. </ul>

 The above code will show the 10 most popular posts. The catagory name is optional, you can give any thing of your wish. I have given the catagory name as PHP.All that is left is to add posts to the category ‘php’. From now on, just as long as a post is in that category, it will show in this list. All you need to do is add and remove posts from this category to alter what this list displays. 

VN:F [1.9.17_1161]
Rating: 7.5/10 (2 votes cast)

How to display popular posts in wordpress , 7.5 out of 10 based on 2 ratings

Incoming search terms:





You will also be interested in ,

4 Responses

  1. saoeajvc says:

    fine..

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
  2. znuafkj says:

    hey cool tutorial man..

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
  3. Fecegluccaply says:

    Gud one…

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
  4. macyhawlDaw says:

    Gud website ;) nice tutorilas.

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)

Leave a Reply

Proudly designed by Mistonline.in.
Affordable Seo PackagesSeo BlogEdu Backlinks