You cannot mix array syntax and string syntax in the same argument. If you start with array syntax, you should stick with that, the same applies if you start with string syntax, then you should stick with string syntax. Because you are using post__not_in
which is an array, you should stick with array syntax
<?php $query = new WP_Query(
array(
"post__not_in" =>get_option("sticky_posts"),
'paged' => get_query_var('paged'),
'meta_key' => 'Sortdate',
'orderby' => 'meta_value',
'order' => 'ASC'
) );
?>
Related Posts:
- How to order posts tag by tag?
- Use REGEXP in WP_Query meta_query key
- Order by optional meta key?
- How to list some posts first in the loop based on post id
- How to get order of posts?
- Order posts by ID in the given order
- What is the most efficient way of querying posts based on visits and date for current day?
- Query Custom Meta Value with Increment
- Show all parents and children in custom post type in right order
- WP_Query Order by Specific Post ID First
- How do I run through a WordPress loop called from a filter function?
- Order by title without taking into account ‘the’
- Order by empty custom field
- How to order posts by title after they have already been sorted by category
- New WP_Query loop in admin causes problems
- WP Query – order posts by meta field first and then order the rest
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- Orderby two meta fields not working
- relation OR instead of AND – Filtered term ID’s in loop
- WP_Query orderby random do not repeat infinite scroll – one loop
- Why does apply_filters behave different inside and outside a loop?
- show most viewed post
- update_post_meta() not updating
- How to order posts, that have already been filtered by custom taxonomy, by their category names?
- WP_Query doesn’t works inside loop
- Display three sequential posts on each page load, without repeating previous
- Sort by meta key within same day
- Add filter to Orderby Parameter using Array
- Order by multiple meta keys on wordpress
- loop through custom post types with meta data
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise
- How to only display posts whose meta_value field is not empty?
- Resetting post data to previous loop in nested loops
- How to add taxonomy filter on the query fly?
- Pagination returns 404 after page 20
- Make loop display posts by alphabetical order
- get custom post type by tag
- WP-CLI How to generate a list of posts with corresponding meta values
- Group posts by custom field
- Transient pagination not working properly
- query posts in functions.php and update a field
- get_posts() seemingly ignoring post_type
- how to fire join query with post_meta
- Which filter/action hook gets triggered after a query has been performed?
- How to show the posts of some category first, and then all other
- Pagination stops at page 6
- Paginated HTML Sitemap
- Why does the_content not work like others for a set post id?
- How to limit total number of posts in wp query loop?
- Minimising Database Queries when using Advanced Custom Fields
- Pagination is broken and I need help fixing it
- How to add post_distinct filter to WP_Comment_Query?
- How to vary post loop results layout and resume?
- Using Ajax to load more posts | Help me change the wording on my button to notify the user
- Get a post from other loop each n-posts in the main loop
- Loop returning only 1 result
- WordPress Loop and $post
- reset to main loop doesnt work
- Applying posts_clauses filter to specific queries only
- Some doubts about how the main query and the custom query works in this custom theme?
- Post loop for all taxonomy terms
- Only display post if published in last 24 hours?
- Which is faster wpdb & get_row or wp_query & ge_post_meta?
- How to remove the most recent post from $the_query
- WP_Query loop else statement not executing
- How to Create a Random List of Child Pages
- Filter post query to only show direct children of category
- search serialised meta_value for date value?
- has_excerpt() not working inside wp_query
- Save (and exclude) posts from loop to use in another loop on page
- Get all posts with empty meta_value
- Check if a post has term inside loop
- Display specific page (that is child) content on parent page
- Compare “Main” post ID to ID inside wp_query loop
- filter posts by meta key with pagination
- Performance concerns: index.php vs taxonomy-$taxonomy.php
- problem with the loop
- Filter sub-category from checkbox form
- Function the_posts_pagination() not compatible with WP_Query arguments
- WP_Query order by multiple meta keys & fields
- Loop order issue with Ajax filter
- How to add a “base” filter for all posts visible to visitors on the site?
- WP_User_Query Orderby Not Working
- How to show specify category template for both parent and child category
- Pagination inside the blog page not working
- Woocommerce featured products query no longer working
- Custom Query Pagination not working on static front page
- query all posts published by certain user id
- modifying the loop multiple times with arguments passed through ajax to wp_query
- WP_Query causing links to not work
- get_post_meta for Custom Post Type ( CPT )
- Query All Attachments and Order by Parent Publish Date
- Order posts by custom column using pre_get_posts
- Iterate through ID’s in loop
- An archive page without post format (just standard post)
- Pull Instagram images into an existing loop?
- Multiple loop for “featured” items returns wrong posts
- First post outside of loop, homepage only?
- How to put posts with some taxonomy on top of others in `pre_get_posts`
- WP_Query filter Posts by timestamp event (range start and end) and by month (next 12 month)