I need help in sorting lists of posts inside a static page by a custom field value. I'm currently using the code below but it is not sorting correctly.
<?php $postslist = get_posts('numberposts=15&order=DESC&meta_key=sorting&orderby=meta_value_number&tag='. get_post_meta($post->ID, 'Tag', true)); foreach ($postslist as $post) : setup_postdata($post); ?>
Any help would be appreciated.