Try to use WP_Query as stated in this answer When should you use WP_Query vs query_posts() vs get_posts()?.
$user_bids = array(
'post_type' => 'post',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'duplicated',
'value' => '0',
'type' => 'numeric',
'compare' => '='
),
array(
'key' => 'accept',
'value' => '1',
'type' => 'numeric',
'compare' => '='
)
)
);
$query = new WP_Query( $user_bids );
Related Posts:
- How to limit the number of posts that WP_Query gets?
- Get current post id in functions.php
- Random sort within an already sorted query
- WP_Query offset argument does not work
- Search by Hyphen
- Exclude drafts in all() view of edit.php
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- Keep getting same permalink with WP_Query?
- How to query posts with current or future date only
- WordPress Number of Posts Not Changing With posts_per_page
- Create new WordPress post [wp_insert_post] based on results of a WP_Query
- Exclude posts with specific meta_value while sorting by a separate meta_value
- Display the latest posts, published in the last hour, with WP_Query
- Custom Order in WP Query
- Fetch posts from current week (Sunday to Saturday)
- Search query – exact post title match
- Converting multiple loops into one single loop with pagination
- How would I get 1 latest post from a query for 5 posts?
- How to get most recent commented post above new submitted post in WordPress?
- How to start with post number x?
- Exclude posts with empty post_content in wp_query
- Exclude posts from featuring
- Lazy Load using WP_Query pagination
- Only display a certain number of posts, dependent on how many posts there are available in a query
- AJAX filter posts by year
- Automatic post deletion
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Yearly archive page for future year
- how to get posts ids inside pre_get_posts filter?
- I want to get title name of post, but i didn’t get by this code. Any suggestion?
- How can I show many posts an author has per week?
- How do I use WP_Query to get a range of posts with custom fields that have numbers with letters in them?
- Change post order random through out the entire WordPress
- How to exclude latest x posts from a paginated query?
- Setup a custom dynamic post
- Anyway to grab author name and featured image in an embeded in inital array of posts outside of loop?
- Removing noindex posts from wp_query
- Ajaxify This Code
- Pausing and Resuming WP_Query results
- How to : pagination in 3 different custom loops on the same page
- Exclude the first ‘n’ number of posts of a tag from home page?
- Query Posts With Over 1000 Views
- List authors with the last post title and order by last post date
- How to order posts by meta_value and title
- How to get Tags with specific post id
- WordPress query_posts by tag doesn’t work anymore(?)
- Ignore latest two posts
- Show posts by author of membership level (Paid Membership Pro)
- Print out last 3 blogposts
- Why posts array is empty?
- How to group only VISIBLE posts? [closed]
- How to check in functions.php if there is data in a WP_Query?
- Shortcode with ‘year’ parameter
- On what hook can I get the queried object’s final state?
- How can I insert a new markup element after 4 posts automatically? [closed]
- If no posts exist for current day and month, show the next available day of posts
- how to handle the loop using filling bootstrap grid structure?
- Get all custom posts with a certain taxonomy
- Link to date_query results in WordPress
- Query function not executed between element [closed]
- When WP_Query only returns 1 post, how do I automatically redirect to that post?
- Limiting post list by taxonomy
- How to display WP Query filters?
- Finding a post’s slug
- Is there a function to get post info for any publish_status by post ID?
- How Can I Always Display A Particular Post First Using WP_Query?
- Optimal WP Web App Backend for mobile app development
- How do I display main query posts in random order using add_filter
- Function is printing twice – any suggestions?
- query posts with selected post ids first
- How to use two query result together in one loop
- show loop id post , only first id can read
- How to get value of a selected option from select tag and use it in WP_query to filter posts?
- Counting Posts by Category
- show image gallery in archives or category page
- Page with Category Returning 1
- filter posts based on menu_order
- Change archive results based on GET request
- wp_query args with relation
- Get 5 most recent categories
- Wp_query loop is not working as it should
- Show all posts from the tags without having to set all of them
- Creating Ordered Query using Meta_key
- Is there a global page/post/product/anything ID?
- wp query custom orderby not custom field
- WP Query between posts custom fields [duplicate]
- Retrieve latest post by multiple categories with ID
- Update Post with Modified Data
- How to Include a common category in a custom Category Search
- The next_posts_link() works only with original $wp_query
- wp_query select if have comments
- wp_query posts sorting doesn’t work
- Limit amount of pages shown in pagination within wp_query
- custom sort posts in archive/taxanomy page
- Trying to create shortcode listing custom posts, but formating not being included
- Show Title/Date/Excerpt of first post & only Title for rest in Query [duplicate]
- Get posts after calculating meta key
- WP_Query post_tilte search in posts table
- Image inside the content is replaced with featured image from my older post
- post loop with different design depending on post