I’m not sure if this is the whole problem but it seems you ‘posts_per_page’ is sitting inside your ‘meta_query’ while it should sit in the same level as ‘post_type’ and ‘category_name’…
Related Posts:
- Can’t sort order of wp_query with 2 meta keys
- Displaying Metabox value (custom post type taxonomy)
- Displaying a div from an assigned meta_value when on a page
- WP_Query of custom post type sorted by meta_key has unexpected results
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- Use WP_query to match post types based on custom field values
- Querying meta values within an array
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- Query all posts where a meta key does not exist
- Meta query with boolean true/false value
- Mixing regular and custom post types (with meta_query) on home page
- WP_Query orderby custom field then post_date in one query
- Filtering a WP_Query meta_query by numeric values isn’t working
- Ordering posts having multiple post-meta date fields
- How Can I save multiple records in same meta key?
- Detect meta value changes when post is updated (post_updated)
- Using Query Posts With Multiple Post Types And A Taxonomy
- How Do I Use WP_Query to Run This Database Query as Search Result?
- Having trouble with custom post type / meta box
- Query for posts from any post type but only add instock products
- query order by date on custom type: wrong order
- update custom post type meta from a shortcode
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- Displaying Meta Box Image
- exclude custom post type by meta key in wp_query
- How to keep a check box in custom meta box for custom post type checked by default for add new post?
- How to add multiple featured image in meta box in post editor?
- Show metabox in custom-post-template depending on taxonomy term?
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- Meta Box Only in CPT Edit Page, Not in Add New
- get_post_meta is returning image id
- Filtering by Post Meta Custom Fields – Performance
- Is it possible to apply a meta_query to one specific post type in a query with multilple post types?
- WordPress Orderby Numeric Value Not Working
- Pull a post based on a meta value in a custom post type
- Populate Custom Fields in a Custom Post Type?
- Setting proper query for multiple custom admin filters
- Custom meta box data array: foreach not working correctly?
- Undefined Variable – Custom Post Type Meta
- WP_Query: include custom post type only with specific meta value
- Returning a list of custom post types excluding those without a specific meta_value
- How to check if user meta field is empty in conditional else statement
- Get posts between custom dates
- A better way to add a meta box to custom post types
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- How to do WP_Query with two meta fields with orderby clause
- Why is this query not working? (Standard posts + custom post type)
- Metabox not show in categories custom post type cmb2
- Can’t publish custom post type – “You are not allowed to edit this post.”
- create custom meta box with default value
- WP_query – Filter by tax_query and meta_query using multiple select
- How to Echo Metadata Value in Currency Format
- Issue on Working with Metabox – Checkbox to enable Sale Items
- Retrieving meta-box from a custom-post-type
- Getting a custom post’s custom field based on another custom post’s custom field select
- Why do I have to press the “Update” button twice to save my meta box values?
- Custom post type suddenly stoped working after WordPress 5 update
- Filter posts of custom post type by meta key in (List All Section)
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- Query Posts, order by meta value
- Using WP meta query to show custom post types by a start and finish date
- Two queries – one with checkbox ticked, one without – comparing meta_query
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- Add a class to post_class if more than one post shares same meta_value_num
- Function to return values from metabox
- Add a meta field to the list of results for a custom post type
- Wp Meta Query does not work while simple Query Works
- How to order query results based on if a custom field has been populated, then the order by the date of the post?
- build child and anchestor three from post parent
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- Custom query result empty on page 2
- How to sort by multiple values in a nested WP_Query
- Show posts from WP Custom Post Type selected from a field in a metabox
- meta query multiple values for the same key
- Sort custom post archives by a meta value from a different custom post type?
- Custom post types – meta_query: search lesson which starts sooner
- Wp Query sort order from custom MetaBox
- post type => ‘any’ not applied my custom queries
- How to get the posts that my following users are liked?
- Linking posts together with Advanced Custom Fields “both ways”
- Metaboxes in Loop
- Not able to get my custom search result using meta_query and tax_query together?
- Custom meta box data not saving
- Saving custom fields for WP_Query to retrieve
- How to show all the associated posts with specific date of data metabox?
- Collect custom post in a calendar
- How to get Current week and current date record wp query
- Querying, storing, and using data from 2 separate custom post types
- get_post_meta for Custom Post Type ( CPT )
- Problem with ‘save_post’ hook not running
- WordPress custom post type
- Edit post meta direct from post.php?
- Howto: use existing post_meta as options for a different metabox (checkboxes or list)
- Selecting posts older than the current Unix epoch timestamp
- Custom Post Type meta oembed html output resulting in WSoD
- Values inside a custom field to determine which category posts to display
- Custom Query With Multiple Meta Key Value
- loop through custom post-type with two meta_keys
- Use a Variable in update_post_meta as the $meta_key
- Order Wp Query by earliest of 3 dates meta query