WordPress: get_post_meta() returns results in random order
Quick and to the point:
- The function that queries meta-data doen't have an ORDER BY
- MyISAM tables change the order of data when updated
- Switch to InnoDB, so all queries without "ORDER BY" are sorted by primary key and your results will be always in the same order :-)
...btw, this bug is reported and should be fixed in WordPress 3.8
léelo en español en: http://www.yukei.net/2013/11/wordpress-get_post_meta-devuelve-resultados-en-orden-aleatorio/
Written by Felipe Lavín Z.
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#