Forums › Forums › Search & Filter Pro › Order post by custom taxonomy
Tagged: custom taxonomy, ORDER
- This topic has 39 replies, 3 voices, and was last updated 7 years ago by Ross.
-
Anonymous(Private) June 1, 2017 at 11:48 am #112502
Hi there!
I’ve got a question: how can i order the results by a custom category? Every post has applied a custom taxonomy, and i need to give the results based on that taxonomy.
I can’t find nothing similar in the Posts> Default order tab.
Any help?
Thank you very much!!!
Anonymous(Private) June 6, 2017 at 4:18 pm #113608Hi again!
I’ve finally changed to ACF field avoiding the custom taxonomy to ordering my posts. But now i’ve a strange behaviour: The results doesn’t respect the title of the ACF option
Why is “Hormonales” before “Antibióticos”, and why is “Antibióticos” before everything else when the right order is the same show it at the sidebar controls (actually i think there is another bug, because “Óticos” is in the last position instead in the “O” group, but i think this is because the accent maybe?).
Help please, what i’m doing wrong here?
Anonymous(Private) June 6, 2017 at 4:32 pm #113616Oops! I think the link to the img isn’t working properly
https://www.dropbox.com/s/lssyac966wbulev/Captura%20de%20pantalla%202017-06-06%2017.11.43.png?dl=0
Trevor(Private) June 6, 2017 at 5:14 pm #113636Sort order depends on the ‘collation’ that your WordPress mysql database is using. You should choose one suited to your language, otherwise the sort order may well be wrong for any accented characters. You can see what it is using if run install and run the ARI Adminer plugin in WordPress, or use PHPmyAdmin.
Trevor(Private) June 6, 2017 at 5:34 pm #113640It depends on whether a sort is made at any point. I am uncertain what the default order would be, but if it is alphabetical, then yes.
Another user had much the same problem. I cannot recall what the ideal one is. I know that WordPress itself moved to the utf8mb4 … series a while ago, but some databases still use the utf8 … series.
For example:
utf8mb4_general_ci
utf8mb4_unicode_ci
utf8mb4_swedish_ciWhatever is set in the database, PHP and mySQL then use that for the sort order.
-
AuthorPosts