Sort categories by meta value

How can I make a list of categories with 4 last posts in each where every category is sorted by meta_value.

For example, template without sorting by meta_value is http://pastebin.com/AeH6vx9b It displays parent categories only.

Few days I am searching something related to categories extra fields but can't find something workable.

This is my best search result. What I have to do with this? I don't understand it. Is it possible to do what I want?

Topic categories custom-field sort Wordpress

Category Web


This is no solution, just an explanation: WordPress currently doesn't have taxonomy meta data. You could add a stand alone table to add meta data there. Anyway, it's not recommended to add your taxonomy/category/tag meta data to the options table as this one wasn't made to get JOINed to do meta queries by it. My personal recommendation would be that you simply add another taxonomy that has your meta value and as well link this one. This would allow you to do default a tax_query by two taxonomies and their terms.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.