You code may be
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'posts_per_page' => '50',
'meta_key' => 'release_date',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'undetermined_date_toggle',
'value' => 'true',
)
),
'paged' => $paged
);
$the_query = new WP_Query( $args );
this code show only those posts which have undetermined_date_toggle key==true
or has checkbox check (selected) sorted by release_date_key.
Important Link:
*In meta_query parameter compare and type as your requirement not necessary to pass they have their default values =
and CHAR
, for more info read WordPress codex for WP_Query
Related Posts:
- Random sort within an already sorted query
- Skipping first 3 posts in wp query
- Filter Posts by Excluding Categories
- how to get posts ids inside pre_get_posts filter?
- Exclude the first ‘n’ number of posts of a tag from home page?
- how can i change WP main archives loop to sort by name or title
- how to get post order by post id wp_query?
- Loop doesn’t exclude the specified category in home page
- Use posts_where to exclude posts ids from wp_query
- How to sort WP_Post Object array by object field in php?
- Ajaxify Post Sort
- Sort / Filter Queries
- custom sort posts in archive/taxanomy page
- Should we trust the post globals?
- Get first post from wp_query
- How to Arrange Posts by Size in the WordPress Dashboard?
- Querying post from a multisite network
- How to know if get_posts() failed?
- Show related posts by category but ignore one category
- post__in for get_posts with a dynamic array
- How to sort posts by last name (2nd word) on ONE category only?
- Query posts distinct authors
- How to get previous 10 days post from a specific date – WP Query
- Post content being duplicated by the_content();
- Specific loop in Shortcode
- Sort posts by activity date
- prevent showing posts of an specific category in admin posts section
- How to output comments number of a post per day?
- Search widget breaks when using multiple loops?
- How to change bulk post status
- If specific user role then sticky post
- Display posts with comments closed, with pagination?
- WP Query related posts by current page Tag ID
- I want to query posts in monthly basis
- Custom WP_QUERY $args
- WP_Query get posts from custom posts by category
- Accessing post->ID outside of the loop for listing child pages
- List posts in a given category
- Reset Popular post query?
- Query Posts multiple conditions
- Future post ID not showing
- Search by post title and content in wp_query without order
- How to do set post permalinks using 6 digit random unique function?
- How safe is renovating $wp_query when doing WP_Query pagination in Page Template
- wp_query random post
- Possible to alternate between two loops
- How to display all posts divided/ordered by post date? [closed]
- Is it possible to use WP_Query to only pull posts with attachments?
- Every second post different class in blog view
- Get posts with multiple categories
- Do not show children of a category
- Display posts of specific category term
- Can’t understand why sometimes a [caption] field appears
- Why in my query is display two title?
- wp_query with ajax
- How to give classname to post if post has no content?
- Custom wp-query in wordpress rest api
- posts_per_page returning only one post
- Need to know custom code to display random and most viewed posts in wordpress posts and pages
- How to retrieve certain number of images from a wordpress post?
- WordPress post filter menu
- How to convert query sql to shortcode in wordpress?
- Current and next month posts
- Why does WordPress search returns same number of results for every search query?
- Same post appears in related Posts?
- Sidebar limiting to 10 posts?
- How to list post as buch of category, and all of them
- Override WordPress core post-template.php block template
- WP_Query outputs wrong post in custom post type
- how to show comments only author which send own posts in wordpress
- Change Old WordPress Post Date Year
- Display/Filter post using if else statement
- Search results for ACF data
- Query prints posts without specific categories
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- Order by meta_key field in WordPress not meta_value field value
- How to create page with post content in it?
- How to remove a post from results by ID after query?
- Override wp_link_pages pagebreak with filter
- Loop through all posts showing duplicates
- WP_Query extended with AJAX
- Manipulate query to show specific post
- WordPress text field in array problem
- How to sort posts in admin by name
- Random order of the 5 most popular posts
- My custom query is displaying random posts in random order
- Get query result according to merged array
- Blog only showing one post even though more published
- How to show the posts list into a static page? Problems to use the loop into a static page
- How do I control the fallback query after the original query returned cero posts?
- Order posts by separate menu order for different sub-categories
- Adding a category at even positions on main loop with modified pagination
- Displaying Results From Custom Taxonomy Query
- Multiple loops on a Search result page?
- What is wrong with this wp_query?
- WP_Query: Fetch posts that are in (category1 and not in category2), OR posts that are not in cagegory1
- Exclude sub sub categories from displaying in the archive page
- Cannot exclude particular post from loop of custom post type
- How do I show the post title if an advanced custom field hasn’t been used?
- How add class the_content();?