@Sadia
Please, try this once::
$args = array(
'post_type' => 'post',
'posts_per_page' => '3',
'post_status' => 'publish',
'meta_key' => 'post_view',// say 200
'orderby' => 'meta_value_num',
'order' => 'DSC',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'post_view_last',//2017-04-14
'value' => date('Y-m-d', strtotime('-7 days')), //value of "order-date" custom field
'compare' => '>=', //show post less than or equal to today
)
)
);
Related Posts:
- Nested meta_query with multiple relation keys
- WP Query Args – Title or Meta Value
- Meta query with string starting like pattern
- Does tax_query really beats meta_query in all situations?
- ACF Relationship Field Search Filtering [closed]
- Query WooCommerce orders where meta data does not exist
- Query Multiple Post types each with own meta query
- Execute a large WP_Query with many “AND” Meta_Queries?
- Query all posts where meta value is empty
- WP_Query min and max values
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- querying with custom meta field with meta_query
- Order by two meta keys
- multiple meta key but get server load is very high
- Finding all results from database within 500 miles of the given latitude and longitude [closed]
- Is “orderby” in WP Meta Query conflicting with Meta Query?
- WP Meta Query for some meta (array) values
- Sort users by meta_value_num
- meta_query with array as value
- Using WP Query to search within ALL keys in meta query
- WP Query – Get WooCommerce Products with variation that is in stock
- Meta_query with or without value
- Use meta_query to display events by date in custom field
- Meta-value query
- Meta query field order together with post_date order causes posts without the meta field to be unordered
- pre_get_posts filter meta_query without conflicting existing meta_query
- Undefined property: WP_Query::$post
- Programmatically set ‘meta_query’ for filter
- WP_Query meta_query >= date
- wp_query not searching with apostrophe
- Extending woocommerce admin product search
- Complex Orderby Parameters: How to query with multiple orderby parameters using meta_value_num?
- Custom query based on meta key – Reduce three states to two in results?
- Performance when getting post meta for post retrieved by meta value
- Adding an array from a query string to a WP meta_query
- Query multiple meta values
- Query by multiple meta elements not seeming to work – wordpress is timing out
- How to display multiple custom fields with the same meta_key in an ascending order?
- Meta_query with multiple keys and multiple values
- How does one perform a sub query with different post types
- Tax query AND/OR meta query [duplicate]
- Help ordering Post loop by two meta values
- WP_Query with meta_query dosen’t return results
- Query with meta_query and tax_query together not working properly
- Array as ‘key’ in WP_Query
- Is it possible to query a custom field where the value is between two fields?
- Filter posts by comparing custom meta value against postdate
- How to provide meta_key array to wp_query?
- Searching for meta_key returns 0 posts
- meta_query fails to compare on values containing apostrophes
- How to set up hierarchical relationships without using plugins / meta query
- Check if searched number is within the post meta value
- Meta query compare for ID’s greater than specific ID
- Is it possible to add relation between meta_query and tax_query?
- add_query_arg to compare and display events from a certain date
- Show single posts date, in a page of posts
- WP_Query Class custom field parameters
- WP_Query not returning correct result with meta_query parameter
- meta_query where the meta value is not the post title
- Order WP_Query by meta_key priority when ‘OR’ relation used for multiple meta values
- Query on meta values and post title
- How do i create a custom post query when the meta value is an array?
- Custom Meta Query doesn’t work the same on two site
- meta_query with meta values as serialize arrays
- WP Query – grouping posts by same meta key, adding together values from another key
- Woocommerce Get Orders By Meta Value
- meta_query is overriding default search
- Multiple WP_Query args combinations according to post type
- WP_Query multiple value not working
- How to do WP_User_Query for Nested Array value Inside Nested Array field
- Query for current post
- Custom query to retrieve oldest post and retrieve others with date interval
- WP_User_Query Orderby Not Working
- Unusual high query of user meta data
- Very slow query generated getting meta data from posts
- WordPress Query optimaization for slow query
- How to filter on placeholder image
- Slow wp_posts and wp_postmeta query using Advance Custom Fields
- Meta query doesn’t remove placeholder escape before query
- WP Query Meta Query
- What is the best way to reset a search on a meta_key / meta_value?
- Slow query when selecting with large meta query or post__in
- WP Meta Query at depth 2
- Extending WP Query: Custom geolocation meta values work, but tax_query breaks
- Using custom field as ‘orderby’ value causing post grouping by publish date
- Is there any difference between below WP_Query code snippets?
- Sorting: custom query with orderby meta_value_num THEN by title
- meta_query compare not doing what I want it to do
- Looking for a way to exclude frontpage and nav menu from query filter
- Creating Custom Query
- Can’t figure out query logic
- WP_Query orderby not working on custom post_type
- Get posts by meta value except one post [closed]
- WP_Query by meta key not returning any posts
- How to get all post_id and meta_value using meta_key in wp_postmeta table
- WP Query – Show custom posts only if user contain some user meta
- How do I subquery with custom meta fields?
- Showing Counts on Comment List with Custom Query
- Use value from meta key array for use in WP_Query
- How to get products with the same custom attribute like ean code