Hello bro try this will work !
$newsItems2 = get_posts( [
"post_type" => "post",
"post_status" => "publish",
"posts_per_page" => 3,
"orderby" => "date",
"order" => "DESC",
"meta_key" => "news__type",
"meta_value" => "general",
] );
Related Posts:
- Advanced orderby with multiple meta_query
- get_posts( $args ) return empty data
- How to sort custom posts including null meta-values in admin columns with meta_query?
- Get Posts from Custom Meta Query
- get posts meta query returning the latest post if no meta key found
- Meta query terribly slow
- ORDER BY custom field value
- Sorting: custom query with orderby meta_value_num THEN by title
- meta_query sorting by 2 keys
- How to return results of a get_posts() in explicitly defined order
- Query between two meta keys
- How do you get posts by meta_query using the JSON API plugin?
- Query all posts where meta value is empty
- How to check a single number value against an array of meta_key values?
- Meta query with multiple logic (AND / OR)
- Best practice – Meta Query vs. post_clauses for “left join” ordering
- Meta Query with date and time on the same Day before given time
- Different page parameters inside query
- LIKE %…% Meta Query
- Multiple Values stored as array in Meta Query
- Documentation for post meta
- Very slow query with meta_query on large database
- How to use meta_query to check if a meta field has something set?
- Using database meta_values to calculate new post order using pre_get_posts or a ‘request’ hook
- Sortable admin column for one meta key with three possible meta values
- Sorting posts by multiple values, combined
- meta_query results not the same with and without spaces
- meta_query all posts between to ages
- How to make a WP REST API query with meta_query in WP4.7?
- Nested Queries using meta_query
- Wildcard with LIKE operator in Meta query
- Query posts only if meta_value is not empty
- How to pass user meta_key and meta_value (values as array)
- WP_Query ordered by meta_value_num doesn’t fetch posts without this meta field
- Query Multiple values for same key
- Custom post type archive with rand and meta_value
- Comparing a field with several values at once with meta_query
- Meta query with a sub query group possible?
- meta_query compare=’!=’ with multiple custom fields
- Sort posts by most recently modified
- meta_query not working on live site
- Query custom field with date
- Meta query with regular expression does not work
- Searching in title or meta, with a tax query too!
- WP_Query with meta_query no results
- Documentation for post meta
- Help ordering Post loop by two meta values
- Meta Query returns wrong number of posts
- Pre Get Posts / Multiple Meta Keys / Orderby Single Key
- WordPress Screwing Up ‘orderby’ => ‘meta_value_num’ in ‘pre_get_posts’
- How to query wp_postmeta table for any specific meta_value?
- User meta query results in PHP notice: only variables should be passed by reference
- meta_query with multiple values optimization
- Get a single post ID based on an exact match of 1 or more meta values
- Delist entries in the_loop
- wordpress Meta_query between numbers range (not working)
- meta_query with multiple key
- ORDER BY custom field value out of where clause
- Order by meta value
- meta query based on month regardless of year
- Extend meta query arguments
- meta_query in WP_User_Query not working – returns every user, not just users where key & value matches
- meta query or with meta value
- meta_query array in ‘values’ returns an error
- get the headlines of the authors’ last post
- how to search all user meta data that have value like “vivek”
- Unable to use meta_query between currency values when value is over 1 million
- Filtering all posts AND sticky posts through meta_query
- How to cache the results of a query and display the cached results
- How to order query results based on if a custom field has been populated, then the order by the date of the post?
- How to Ordering by user meta
- get_posts query is taking about 40 seconds to execute
- How to send variable to wp meta_query value?
- Order (by ASC) posts with meta_key so posts without values are last
- WP get_posts meta_query using ACF repeater field
- get_user can’t read variable
- Drop down filter sort posts by latest, last 7 days and monthly
- meta_query check multiple date formats
- How to mark only one post as Featured post?
- Reading Content in an Array as it relates to a meta_query
- Meta_Query with multi select values
- Trouble with calling an imploded variable in an array
- Meta Query returning empty array
- Query for user roles and their skills
- meta_query for user ID in array
- Display query post based on two orderby value in wordpress
- How to exclude posts with empty and non-existent relational custom field with meta_query?
- Using get_posts, I need to use a combination of OR & AND relations
- Use not custom fields in get_posts() meta_query?
- How to get meta value based on latest post id with group by term name
- How to compare date in post meta value
- Multiple Queries with meta_query
- Which Meta Query Compare Method Should I use?
- How to output meta_key in wp_postmeta?
- Sorting posts by specific order
- meta_query and strange orderby behaviour
- order by meta_key [duplicate]
- Meta query with string NOT ending like pattern
- acf/save_post affecting WP_Query results
- Merge meta_value’s into a single row and then loop