I am guessing but based on your choice of placeholder names in the code above…
$args = array(
'meta_key' => 'myvalue',
'orderby' => 'meta_value_num',
'order' => 'DESC'
);
… your meta_key
argument is wrong. That is the meta key not the meta value as your naming convention suggests.
meta_key (string) – Custom field key.
http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
Replace query_posts
with a new WP_Query
object or use a filter on pre_get_posts
to alter the main query. This site is full of examples for both. Even the Codex tells you not to use this function:
Note: This function isn’t meant to be used by plugins or themes.
If that doesn’t help then you are going to have to provide more information, but my guess would be that your meta_value
isn’t numeric but has other things as well– punctuation, letters, something.
Based on the updated code, I am pretty sure that what you want is thsi:
$args = array(
'posts_per_page' => 10,
'order' => 'DESC',
'paged' => $paged,
'meta_key' => 'likes_count',
'orderby' => 'meta_value_num'
);