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,
- <h3>Popular Posts</h3>
- <ul>
- <?php query_posts(‘category_name=php&showposts=10′); ?>
- <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
- <li><a href=”<?php the_permalink(); ?>”>
- <?php the_title(); ?></a><br /> <?php the_excerpt(); ?>
- </li> <?php endwhile; ?>
- <?php endif; ?>
- </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.
Incoming search terms:
- get_dns_record php extension (3)
- $form- dropdownlist onchange event in yii (1)
- deny direct access to swf wamp (1)
- display data in textarea from database onchange of list in yii (1)
- dropdownlist load from db symfony2 (1)
- redirect comment datso gallery (1)
- symfony pragma (1)
- yii drop list onchange (1)
You will also be interested in ,
- How to create random passwords using php
- Recuva best file recovery software
- Simple Javascript Slideshow
- How to install XAMPP
- Caching of images using javascript image object
- .htaccess some facts and rules
- Caching of web page using php
- Windows XP shortcuts for interner explorer, excel and powepoint
- PHP E-mail with attachment
- Simple PHP Login Script


fine..
hey cool tutorial man..
Gud one…
Gud website
nice tutorilas.