Currently your meta query is exclusive and you need to make it inclusive. For example, you can save always the meta field show_in_news for match-report custom post type, even when the value is false. Then, you can include posts if custom show_in_news doesn’t exist (standard posts) or if it exists and it is "true" for custom post type:
$queryArgs = array(
"post_type" => array( "post", "match-report" ),
"meta_query" => array(
"relation" => "OR",
array(
"key" => "show_in_news",
"compare" => "NOT EXISTS",
),
array(
"key" => "show_in_news",
"value" => "true",
),
),
);
This should do the job.
Related Posts:
- Filtering a WP_Query meta_query by numeric values isn’t working
- Display posts if a custom field value is equal to another custom field value
- WP_Query order by custom field, then randomly order some of results
- Query custom post type with ACF Date
- Order Custom Post Type by Custom Field Value
- Query based on custom fields start and end date
- Group by custom field value (start and end times)
- Create if else for post types in WP_Query ‘post__in’ values
- Filter posts by their related field’s custom field
- Display ACF object field data using Elementor Custom Query
- Multiple orderby values in WP_Query
- Search multiple custom fields by using meta_query
- how to filter by last name for custom post
- Automatically fill custom field value on post publish/update
- Filtering a WP Query result
- Display Custom Post Type Fields
- How to sort a table of custom posts by column containing custom field
- Use Custom Post Type as Custom Field
- WP_Query on custom post type not displaying, multiple loops & get_template_part
- Using new WP_Query in shortcode in a custom field causes the main post content to not display
- WordPress query by multiple Custom fields and order by date
- WP Query group/order by category name
- Query current and future events, ordered by begin date
- How to Display ACF Relationship Custom Field as Link to Specific Custom Post?
- Query Custom Post Types by date (custom field) range
- wp_query to find posts by year and month
- How to dynamically attach pictures to a carousel
- Remove duplicated values from a loop
- Including Custom Meta with posts_where query
- WP_Query: include custom post type only with specific meta value
- WordPress custom loop filter by meta_key and value with serialize data
- Retrieve value of a category’s custom field
- How can I dynamically add a post to a custom post type which uses a custom field?
- How can I get the number of custom post type posts that have a specific attachment image set?
- Bulk Update Custom Fields for Custom Post Types
- Problem querying Custom post type by custom fields
- Orderby CPT custom fields not working
- Troubles with acf/save_post and WP_Query
- Including metaboxes from custom post types in global search — continued
- ACF From & To Date Validations
- Query Multiple Custom Posts by Custom Fields
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- First custom field value (out of several) displayed twice after query
- Multiple Frontend Filters Using Advanced Custom Fields
- Possible to filter custom post type with multiple meta data?
- Displaying custom field according to date
- WP Query ‘posts_per_page’
- How to get specific post meta by title or id
- How to inherit field value from parent post into in child / sub post
- Custome fields not displayed
- posttype and custom fields on multisite
- How do I get_the_postID() for a custom post that uses ACF repeater field?
- Custom post types, disable fields
- Using WP meta query to show custom post types by a start and finish date
- Cache issue with WP_Query and custom field filtering
- Excerpt length: get first paragraph
- How do I list a custom field and custom taxonomies for each result in a loop?
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- ACF – Retrieve custom taxonomy from a relationship field
- Sort custom posts by date and then by taxonomy
- Query custom post type that has a serialized relational advanced custom field value
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- WP_Query get always custom post_type for first
- Sort custom post column by generated value?
- How can I query and sort custom-post type using WP_Query
- Query custom post type and custom field by URL parameters
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- Query a Custom Post Type using SELECT that has ACF fields to compare dates
- 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
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- Show specific posts with WP_Query using ACF Post object
- Filter custom WP_Query by first letter of a custom field – hopefully using Search and Filter Pro?
- sorting in wp query based on custom field value
- Meta_Query refuses to return results
- Linking posts together with Advanced Custom Fields “both ways”
- Custom Field as Custom Post type element class
- How do I display specific custom posts, and how do I edit a post’s singular page?
- Automatically convert standard posts with custom fields to custom post types
- WordPress query in which condition uses custom field
- WordPress loop add heading before first of type
- Error in WP Query. If variable is empty it is displaying previous post value
- Get month and day from a Date Picker custom field
- How to stop wp_query searching pages as well as the specified CPT
- How to query posts by meta keys AND under specific category?
- Selecting posts older than the current Unix epoch timestamp
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- WP_Query and two custom fields returns no posts
- Storing/querying custom date data
- Custom Post-type not returning the right child_of
- Query recent posts by author
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- querying to custom field over ACF REST API
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- WordPress custom field sorting, weird behavior: the latest post is at the end
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- WordPress WP_Query Sort by 2 dates – custom fields
- WordPress duplicating posts from single loop
- How to automatically update ACF field value every year?