4

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.

  • Did you get the answer? – trusha Nov 18 '19 at 6:59
0

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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