post is not a valid value for orderby parameter neither DESC. You can choose any of these values. Also, you should stop using query_post.
<?php
$args = array(
'post_type' => 'ranking',
'orderby' => 'menu_order',
'order' => 'DESC',
'posts_per_page' => 10,
'meta_key' => 'top10',
'meta_value' => 'sim'
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) {
$loop->the_post();
//Do whatever you want with the posts
}
//After the loop reset post data
wp_reset_postdata();
?>
Related Posts:
- query_posts with meta_value
- Custom query with orderby meta_value of custom field
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Max length of meta_value
- Query Posts or Get Posts by custom fields, possible?
- SELECT max(meta_value) FROM wp_postmeta WHERE meta_key=’price’… stops working when value is over 999
- How can I display all values of a custom field from posts with a certain value of another custom field or from certain post types?
- query_posts and only show results if a custom field is not empty
- Filter archive.php by custom meta
- get_pages sort alphabetically by meta value
- Assign/update the custom field value for all posts
- Order posts by custom field and if custom field is empty return remaining posts
- Order by custom field date with ASC order
- Query on custom field count?
- How to break meta values into different items and avoid duplicates?
- How to use query_posts() with a date filter on a custom field?
- WP_query : meta_key with custom rule for specific value
- meta_value_num sort glitch
- Can ordering post list by meta_value cause performance issue?
- Order by value in serialized custom field
- Author Page Custom Query WHERE author OR [post meta value] OR [post meta value]
- How do I query for a post by custom field?
- meta query not showing any results?
- How to sort category by custom field value
- trim custom field text value and show (…)
- how can i use custom field in query post
- using multiple meta_key and meta_value in query_posts
- How can I sort homepage by a meta value?
- Order query by meta_value with multiple custom fields
- How to wrap meta values seperated by comma in ? [closed]
- How to create a Custom Meta Box with Name/Value Admin User Input Fields?
- Show 1 post and after a specific date show the next one
- Run a check for multiple meta key values
- Filter by custom field (meta_key) using JSON API
- How to select posts from multiple categories and metavalues?
- meta_compare seems to be treating values as strings instead of integers as expected
- Removing link ” from ” on meta_value in custom feilds
- Sort alphabetically by custom field
- Change order of posts
- filter custom field values $min $max
- query posts custom field calculation value
- WP Query – Is this correct?
- Query_posts with custom field meta value
- Unable to get specific value from post meta
- pre_get_posts : only get posts by wp_usermeta value
- meta_value and meta_key filtering returning no posts [closed]
- IF Custom field value equals ZERO
- List custom field values in alphabetical order without repetition
- How to update a custom field in all posts with the value of another custom field in the same post?
- Update post meta custom field using block editor
- How to add custom filed value after in wp post title
- Sortable Custom Columns not sorting correct
- Meta_query ‘compare’ => ‘LIKE’ not working?
- Custom search SQL Query to add custom field in result
- How to put forward a blog post
- How can I change the publish date based on a custom field?
- Show array of meta_value in Edit Post Coloum
- Get author total post votes from post meta
- Problem with writting correctly a query posts args in WordPress
- simple fields plugin custom query
- Making WP_Query limit results by date before today where date is a meta_query
- User query – getting values for custom meta keys/fields
- get posts based on non-single metadata
- Set class if a meta value is set within post archive
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Create Shortcode shows only posts with custom_field meta
- query_posts -> get page_id from custom field
- 4 Unique Random Posts based on Custom Field Values
- Custom Field: Display only if a specific key is selected outside the loop
- Checking if field is set before comparing with meta_query in query_posts?
- Filtering posts by WORD in custom field
- Display agents (custom post type) alphabetically, except one who always shows last
- Filter Query Post by Custom Fields(by date)
- WP Query Args – search by meta_key or title
- Saving multiple custom meta box fields
- get Custom field label (select/dropdown) on front end
- get_the_ID() retrieves same ID on Gutenberg’s Query Loop
- Can I count every article following extracted meta value?
- Best Practice for storing aggregate data by date or other criteria?
- Block Editor – Meta values not saved, meta changes to empty array on update
- explode array within shortcode
- Can I count the number of users matching a value in a multiple value key?
- How to delete custom field “suggestions” from dropdown list
- How to load php file for specific page in admin?
- ajax jquery update custom field meta value front end
- get_post_meta not working inside loop
- How do I exclude posts by custom field value?
- Auto populate a meta box field from another meta box field when publish or save
- Better way to save image in custom field
- Jetpack post types Portfolio or Testimonials support for custom fields?
- How to add new field to the account address?
- Display Multiple Values of Same Key
- The conditional logic only works to show or hide?
- Query multiple meta values at the same time :
- get wordpress post loop by meta box date
- Sub Field of File Field
- ACF plugin and field update
- My meta boxes update wp_postmeta of posts but not of pages. What is wrong with the code?
- Post thumbnail size for custom field only
- Display meta data from a custom field within plugin Category Grid View Gallery