Thats code just querying the posts by sorting it by meta value, but you have no loop for the posts to display. Add the loop after the query for something like this:
echo '<ul>';
if ( have_posts() ) : while ( have_posts() ) : the_post();
echo '<li>';
the_title();
echo '</li>';
endwhile;
endif;
echo '</ul>';
Related Posts:
- Can’t get full post title if there a spaces in title
- How to display only one category in a custom post type?
- Adjust the order for returned posts
- Get first comment link on the post itself
- Display post category in foreach loop with category link
- Sticky post appears twice
- do_shortcode within post query
- WordPress Custom Fields (Checkboxes with multiple values)
- How Can I Query a Specific Page From a MultiPage paginated Post
- Why WP_Query(‘showposts=5’) shows only 1 post?
- Get Meta Key Value While Saving Post
- How to make number of blog posts a custom field?
- Query get post,how to add comment box
- filter RSS feed in URL
- WordPress custom Query for Posts in Category display posts multiple times
- get query() without post content?
- How can I setup a relationship using categories in WordPress?
- Exclude the first ‘n’ number of posts of a tag from home page?
- Creating a post from data returned from HTML form
- posts_per_page option limits the number of Gallery items
- List authors with the last post title and order by last post date
- Pasting code into WordPress post – LFs being eaten
- How i can limit period of post publication?
- How to setup a query to output posts by groups of five?
- Display post category in foreach loop
- Exclude current custom post on single post
- Dynamically switch template on click
- How to get posts and comments amount per hour, per year and per month?
- Get all custom post types excepted some…
- Page template is accessing the incorrect posts?
- Get all comments of author’s posts
- First x post with another template then the others
- Why Query is returning empty array?
- Delete all drafts?
- Wrap every month posts in div
- Inner join overrides Advanced Custom Fields plugin’s get_field [closed]
- meta_value timestamp older than now
- Counter is skipping post when I still want it visible [closed]
- Do not show children of a category
- post__in not working with pre_get_posts, but post__not_in does work
- Loop don’t work within single.php page
- How to get all post_parents of a post?
- Get post meta retrieving wrong value
- Query for first 3 posts to change the look and feel
- Adding a user’s ID behind the tag ref link address
- Why posts array is empty?
- How can I remove the first two words and shorten get_the_title()
- Query posts and filter at query time by value of custom meta
- Run query_posts if SESSION is empty?
- WordPress query undefined offset in loop
- Very complex post query
- Delete post revisions only for a single post
- How to give classname to post if post has no content?
- Display post by click on the link
- Queries take 120+ seconds on my large WordPress site
- Exclude some posts from displaying in wp_query based on some condition
- Related Posts function not working
- How to retrieve certain number of images from a wordpress post?
- How to convert query sql to shortcode in wordpress?
- WordPress loop not working on static front page
- Some doubts about how the loop work (trying debugging it)
- How to show 3 most recent/viewed posts in a special tiles on home page using wordpress?
- Dark Bar at the top of wordpress page can’t be seen?
- How to add PHP code snippet to all Post pages?
- Display message depending on capability outside loop
- Limiting the amount of posts retrieved by the loop
- Display pages from specific page template
- Displaying Results From Custom Taxonomy Query
- How to limit the number of results for all query_posts on mysite
- Sort post by category using HTML Select tag
- How to store post rating system data post independent?
- Show a Category Specific Info Box
- How to get all the terms of a post
- WP_Query retrieve custom posts but not the post showing
- User driven content problems
- How can i retrive the movies, trailers, news in a single page using search
- How can I create a menu items from meta box based on users input
- Special Query: Title, Terms, Content – %LIKE%
- Creating pages and getting their values from the database table
- Older entries link within a category page
- How do I display a full post, not just an excerpt?
- Remove read more
- Make division in post_query?
- How to limit post query to only return a total count of items with certain post statuses?
- Insert new post for each user infinite loop error
- List direct children of page
- Unable to get posts with category on my page
- wordpress radio button on single post page
- How *not* to show the last post on the latest posts list
- Create post from form with image
- Display one post randomly from category on home page
- Exclude a ‘portfolio’ custom category?
- Display a custom field rating system in the front end
- get value from post to sidebar
- Echo author slug in post edit page
- Adding a content rating system
- How to set value in Query Loop?
- Wp_query WooCommerce products
- The page that displays Posts on homepage
- query_post or single-[cpt].php?