News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Customizing WordPress Search Results to Sort by Title
May 06, 2009 @ 09:30:09

DevShed has a new tutorial posted today looking at two methods that you can use to sort the search results from your WordPress blog my title instead of by date - a bit of code and a plugin.

Sorting search results by post title in WordPress is often useful, if your website needs its entries to be sorted alphabetically. As a quick background, WordPress is the most popular open source, free blogging/CMS platform. However, the default search results are sorted by date, so there is no easy way to sort them alphabetically except to edit the core WordPress search functionally source code.

Here's the two options:

  • Updates to the Query.php file to change up the "order by" value to work for the post_title and ascending/descending sort orders
  • The Sort Search Results by Title plugin that lets you keep away from the WordPress source and change the results order with a drop-in plugin
0 comments voice your opinion now!
wordpress search results title tutorial plugin query orderby


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: AJAX Chat Tutorial Pt 5: Javascript, Sending Chat Messages, Screen Name Changes

NETTUTS.com: Don't Ignore Your WordPress Footer

DZone.com: Using a stream wrapper to access CouchDb attachments with PHP

Lineke Kerckhoffs-Willems' Blog: How to use the Symfony2 SonataAdminBundle

Raphael Stolt's Blog: Using MongoHq in Zend Framework based applications


Community Events





Don't see your event here?
Let us know!


community interview composer version security series update application tool podcast framework opinion introduction symfony package library laravel language voicesoftheelephpant release

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework