Show wordpress search result in Ascending order

WordPress shows search result always in descending order to change it into Ascending order follow the given blow instruction.

Change this line

<?php if(have_post()): ?>

to

<?php query_posts(‘order=ASC’);

if(have_post()):

?>

Now you are done to show your search result in Ascending order.

Bansal Sumit

To seek challenging roles and to achieve excellence in the field of Open Source Web Technology with a profound spirit of commitment and dedication.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.