WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an "author" category that is used as a list to browse multiple posts containing author biographies. I have Smart Category Ordering installed and right now it is sorted by title ascending. Unfortunately there isn't many options on this plugin and I haven't found alternatives.

Posts are titled "Firstname Lastname (country)" and I want Lastname (or some custom field value) to determine the post ordering for the AUTHORS category only. I have other categories for news posts I don't want affected. I've seen some ways to do it in PHP but that would affect the entire site.

share|improve this question

You have 2 ways.

First is to write custom SQL query manualy for your request and loop that data.

Second is to loop your data on standard way, save in multidimensional array, filter, transform and reorder that array via PHP how you need and after that loop that data and print like content.

Booth ways are good but my recommendation is to write SQL query because is faster and cleaner.

Like I know WP don't have a done solution. You need to build by own.

You need to build custom template for that special category and do that there.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.