Quick patch : WP_User_Query orderby meta_value_num

This article is a quick patch/fix for orderby meta_value_num in WP_User_Query

When you want to sort users by their meta key there is option, but if meta value is number and you want to sort them, then there is nothing like meta_value_num in WordPress (at the time or writing (WordPress 4.1 )) for WP_User_Query. So here I have written a tiny code snippet that will be helpful.

Shyam has written 21 articles

Shyam is senior full stack developer, who loves to explore new technologies and work on them. He's passionate about coding so can code 24/7. He uses PHP as a backend programming language.

He knows Laravel, MySQL, AngularJS, ReactJS, Redis, Kubernetes, Git, CodeIgniter, PHP, MVC pattern, Lodash, jQuery, VanilaJS, Teamcity and many other technologies and tools.

Shyam writes notes and hacks on his blog (http://shyammakwana.me). In spare time he can be found @ StackOverflow or crafting any new open source application.

Passionate Programmer and Meditator #PERIOD.