scríbhinní ⁊ deocháin do chuallucht na Gaelainne

Músgraí Ord Postaí sa Deais WP — A Plug-in to Control the Order in Which Posts are Listed in the Dashboard

Author: Mícheál Ó Lochlainn, Áras Shorcha Ní Ghuairim, Acadamh na hOllscolaíochta Gaeilge, Ollscoil na hÉireann, Gaillimh.

Published: 2nd March 2016.

An leathanach so à Gaelainn.


WordPress, plug-in, dashboard, posts, alphabetical order.


There's not much to say about this plug-in.

Out of the box, WordPress lists posts in the Dashboard in chronological order. This makes perfect sense when it is being used as a blogging platform or to publish content where the order of creation is the same as the most useful order of access.

But WordPress is used for all kinds of Web publications and outside of blogging, alphabetical order is probably a much handier (and commoner) way to list entries. Músgraí Ord Postaí sa Deais WP makes it do that.

Músgraí Ord Postaí ar Leathanaigh Chatagóra WP

This plug-in is, effectively, the half-twin of the Músgraí Ord Postaí ar Leathanaigh Chatagóra WP plug-in, which does exactly the same thing only it does it in the website's public view rather than in the Dashboard. There's a good chance that if you want one you'll probably want the other.

Credit where it is due

All the credit for this plug-in's functionality belongs to Michael Ecklund, who posted all the important bits of the code on StackExchange.

All I'm after doing is pouring these into the framework of a plug-in. The original code was published under CC BY-SA 3.0 and, in accordance with the Ts and Cs, I make my own modifications available under the same licence.

Download Músgraí Ord Postaí sa Deais WP

Install Músgraí Ord Postaí sa Deais WP

Just extract the músgraí-ord-postaí-deais-wp directory from the tar.gz or zip file, upload it to the WordPress plug-ins directory, activate as normal and that's it. There's no settings and no control panel.

Reverse-alphabetical order

There's only one file in this plug-in: músgraí-ord-postaí-deais-wp.php. If reverse-alphabetical order is what you're after, and you're comfortable doing minor fiddling under the bonnet, go to line 62 and change $query->set('order','ASC'); to $query->set('order','DESC');. Símples!