DEV Community

mhsohag11
mhsohag11

Posted on

Answer: WP_Query orderby meta_value_num not working

I know it's old question, byt maybe my answer will help somebody.

Problem here is that prices are strings as @muka-gergely mentioned, so the sorting will be alphabetical which is fine for strings (i.e. words), but can be unexpected for numbers (e.g. 1, 3, 34, 4, 56, 6, etc, rather…

Top comments (0)