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
- 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
- Display custom post type from dynamic custom field
- Populate dropdown from one custom post type inside another custom post type
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- How to check if user meta field is empty in conditional else statement
- wp_query check if integer exists in custom field’s array
- 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
- Stuck in Order by more then one
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- Why is this query not working? (Standard posts + custom post type)
- Metabox not show in categories custom post type cmb2
- WordPress request fiter order by related post’s post_title
- Show Custom Post Type meta boxes only on Page Edit
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Possible to filter custom post type with multiple meta data?
- Query based on custom fields start and end date
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Meta Data for Custom Post Type not saving
- 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
- How to get specific post meta by title or id
- 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?
- Inefficient Query Confusion
- find custom post type post by searching its custom field with my string
- $post->post_meta not pulling any post in wordpress/php
- Values from meta-box not on $_POST
- Returning a custom content types with meta values
- Custom post type suddenly stoped working after WordPress 5 update
- Create a WP_Query where if the first value of the first row is equal to the second compare other value
- Filter posts of custom post type by meta key in (List All Section)
- How can I output WPAlchemy repeating fields meta values in my page template?
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- Save Metabox Custom Field Value
- Meta box data not saving
- Query Posts, order by meta value
- Sorting by meta_key different to search criteria?
- Related posts meta_query CPT
- 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
- Meta box with front-end styling
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- Cannot Save MetaBox Data in Custom Post Type
- 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
- Empty meta-box returns publishdate if no value is set?
- how to compare different timestamps in wp-query for events custom post types?
- Custom Meta Box with variable number of fields
- 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?
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- After inserting new post with wp_insert_post() the post is not visble to WP_Query, but the same WP_Query works for post inserted from wp-admin panel
- build child and anchestor three from post parent
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- meta query condition don’t work
- 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
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- meta query multiple values for the same key
- How to get post by meta value
- Sort custom post archives by a meta value from a different custom post type?
- Get meta values from parent post and save in child post
- Custom post types – meta_query: search lesson which starts sooner
- Wp Query sort order from custom MetaBox
- How do I get all authors posts of a custom post type outside loop
- post type => ‘any’ not applied my custom queries
- How to get the posts that my following users are liked?
- Meta_Query refuses to return results
- 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 shows CPT which has specific meta key?
- How to get Current week and current date record wp query
- How to get post meta for custom post type and taxonomy
- Querying, storing, and using data from 2 separate custom post types
- get_post_meta for Custom Post Type ( CPT )
- Query events post type after current date and timezone
- Conditional posts in WP_query for search
- Delete custom post type metadata without deleting the post in admin area