meta_query
needs to be an array of arrays – have a look at the code sample in the Codex again.
So, for your example:
$args = array(
'post_type' => 'pf_cookbook',
'meta_query' => array(
array(
'key' => 'pf_cookbook_recipes',
'value' => '5',
'compare' => 'NOT IN',
'type' => 'NUMERIC'
)
)
);
);
Related Posts:
- WP_Query with “post_title LIKE ‘something%'”?
- How to extend WP_Query to include custom table in query?
- Can wp_query return posts meta in a single request?
- compare meta_query in get_posts arguments
- How to use the_posts_navigation for wp_query and get_posts?
- How to paginate attachments in a secondary query as gallery?
- How do I order pages and categories by ID or name in the same query?
- How to do a query only on a specific admin page?
- WP Cron and wp_insert_post
- How to make an activities stream mixing posts and comments?
- How to adjust found_posts so that it accounts for offset and pagination
- SQL query equivalent to WP User Query
- Function to check if author has posted within the last x days
- Single page theme that uses pages for the content
- Show default content if custom WP_Query has no posts
- WP Query for Posts (Products) in Specific Category that has 2 Specific Tags (*AND* both tags not *OR*)
- using wp_query to return posts w/ comment count > 0
- WP_Query Performance Issues with meta_query
- Get posts using WP_Query
- How is WP_Query connected to WP_Post in The Loop?
- How to use order RAND() on WordPress?
- How to display the modified post today
- WP_QUERY loop, offset in the arguments and the paginate_links – can these work together?
- wp_query for displaying attachments with a tag
- Mysql query LIKE not working
- Query: offset post list, unless it’s a specific category
- Multiple taxonomy And acf filter group by
- Get number of authors
- WP_Query Not Recognizing Taxonomy Parameter in Custom Search
- Sorting events by descending date, and ascending time if multiple events on a date
- WP_Query orderby author__in
- Take all produts by category
- How can I display a custom field from all posts and order them individually from their parent post
- Filtering out child category posts from parent category archive not working
- Custom Query include private posts in pagination count calculations?
- meta_query not working as expected
- WP_Query with offset and ‘orderby’ => ‘rand’, offset not working
- WP_Query Limit Data_Query last 90 days
- How to retrieve the date on which a post was moved to trash?
- wp_query with parameters
- Sort WordPress Posts Meta value by Week not Day
- Ordering a mysql style datetime stamp with meta_query
- Best choice for multiple loop in page?
- wp_query get data from advanced custom field in wordpress
- Wildcard search in WP Query
- Get Child Category only
- Order is breaking wp_query
- How to display all posts not in a post_format
- Especific order by Custom Field Values in WP_Query
- How to filter query loop block with a search string from the query parameters
- WP_Query – How to get all posts of specific days of week by custom field date?
- How can I comment comma-separated array values?
- WP_Query returns no posts for category
- Querying a large number of posts including their custom fields data
- Group posts by attachment meta key
- date_query is showing duplicate results
- Post__not_in only removing first 2 pages
- How to query posts for custom post type with featured image for first 2 post?
- Query posts by searching for a string in a meta field
- Added Date Filter To Popular Posts Query
- WP_Query with 2 genres
- Display posts from an array of ID’s
- Date not appearing in custom query
- Custom post type – filter content by custom meta box content
- How can I build a query that returns all attachments of a page and it’s children pages?
- Query ACF relationship field – Comparator IN – Value array
- Use get_cat_ID to retreive multiple category IDs
- How can I modify the query by adding to the existing query?
- WP_Query Regexp whitespace and end of string
- Custom order of posts in wp_query and different taxonomies
- WP_Query paginate with one term per page?
- Update wp_query every week
- wp_insert_post with ACF Fields and WP Meta Query returns no rows until update
- using custom meta user data to run queries in WordPress
- Look for string in posts and postmeta
- Multiple meta_query not working
- Is meta_key used for ordering, filtering, or both?
- Save query in function for custom gallery
- Merge two queries and remove duplicate
- Convert SQL Query to WP_Query
- WordPress wp_query add custom query as field
- Get a page ancestor from a most viewed list
- What argument does my function need to echo get_results() query results
- 3 wp_query on one page with pagination for last query
- Custom pagination (Title, date and teaser)
- Using custom field as ‘orderby’ value causing post grouping by publish date
- Sorting Posts with meta value not working
- Display posts from catagories
- Add pagination to table generated by wp_query
- Fire query on ajax post url page
- using next-page and previous page inside a wp_query
- What is wrong with this pagination code?
- tax_query not working properly with get_posts
- how to add limit records in wordpress query
- query only direct child and sub-terms of a current term archive
- restrict posts per page
- Get access to all terms associated to each post that the wp_query loop displays
- WP_Query by meta key not returning any posts
- I want to capture the last day’s (today) posts in a category in the numbered order in acf
- How to efficiently find “duplicate” posts, where the titles are different, using metadata to match posts?