I am new to WordPress, I got a site which is using the "I love it!" theme. It provides a like function and record number of likes.
I am trying to sort all the posts by the number of likes, but I just don't know how to do it. I have tried plugins as well, but the meta key of each post in that theme are being stored in a different table "postmeta".
query = new WP_Query( array ( 'orderby' => 'meta_value_num', 'meta_key' => 'nr_like' ) );
I can't find the loop in the theme, I have made up the query script, I don't know where should I put it into to make it work.
Could anyone help me or just advice me, pretty confused actually?