i’m using this query
$numposts = get_option('posts_per_page');
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('cat=5&showposts='.$numposts.'&paged=' . $paged);
how to order the posts by custom field?
i’m using this query
$numposts = get_option('posts_per_page');
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('cat=5&showposts='.$numposts.'&paged=' . $paged);
how to order the posts by custom field?
You must be logged in to post a comment.
how about?
or instead of creating a new variable just to hold the custom field just add it straight into the query..
I used a plugin for that:
http://www.dyasonhat.com/plugins/wp-smart-sort/