Change default article sort order in Joomla back end

By default Joomla sorts articles by title, which may be fine in some instances, however, most of the time people prefer to have them sorted by date with latest articles at the top. Normally, to do this you would have to click on Date heading twice.

There is no built-in option to change default sort order, but this can be achieved by making a small change to one Joomla core file.

Note: As this is Joomla core file, our changes can be overwritten by Joomla updates. Always back-up a file before making any changes to it.

Open administrator/components/com_content/models/articles.php

On line 97 you will find following code:
parent::populateState('a.title', 'asc');

Change this to:
parent::populateState('a.created', 'desc');
Save changes and you are done.

Joomla 2.5

Comments  

Vilizar
# Vilizar 2013-02-23 11:07
This is indeed very useful. And if you want this default article sorting to be done by the "Ordering" column, you can use:

Quote:
parent::populateState('a.ordering', 'asc');

Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait