You can try:
'date_query' => array(
array(
'year' => date( 'Y' ),
'week' => strftime( '%U' ),
),
),
where %U
is:
Week number of the given year, starting with the first Sunday as the
first week
or
'date_query' => array(
array(
'after' => strtotime( 'last Sunday' ),
),
),
Related Posts:
- How to output comments number of a post per day?
- Get random posts between specific dates / of specific age
- How can I show many posts an author has per week?
- How to get posts published on the latest date?
- wp_query if have posts show date but not in loop
- Change Old WordPress Post Date Year
- The next_posts_link() works only with original $wp_query
- Query *only* sticky posts
- Skipping first 3 posts in wp query
- Accessing the post content with WP_Query
- Get only modified posts
- Should ‘setup_postdata()’ be reset with ‘wp_reset_postdata()’?
- Hide Post comments when displayed via WP_Query
- posts_per_page doesnt work
- wp query with dynamic taxonomies and terms?
- Blogroll – Different layout for first post
- How do I use `posts_distinct` correctly?
- Automatic value for custom fields for posts
- Loop through all product posts?
- Improving WP_Query for performance when random posts are ordered
- Display post from specific date
- Why won’t my taxonomy query show up?
- How to find what index page a post is on?
- Get Posts that are in the current month or later
- WP Query to Get Array of Slugs
- If modified on same day, show only time
- WP_Query with ajax handler returns the same posts
- Why WP_Query(‘showposts=5’) shows only 1 post?
- How can I sort posts by the date and a custom meta field?
- Hiding Draft Post In Admin
- How to insert 2 args into 1 Wp_Query for a slideshow
- Update all comments time to random dates?
- How to verify wp user password by sql query in wp? [closed]
- WP Query – Posts Per Page not working in combination with category__in
- Lost draft under all posts and drafts
- Get user categories with most posts in it
- how to change the number of posts returned in a specific loop without making it global?
- List authors with the last post title and order by last post date
- How to order posts by meta_value and title
- Nested WP_Query breaking loop
- WordPress query_posts by tag doesn’t work anymore(?)
- Why Query is returning empty array?
- Ignore latest two posts
- meta_value timestamp older than now
- Changing default WP-Site creation date
- Print out last 3 blogposts
- Query for first 3 posts to change the look and feel
- Getting blog pagination to work on page set as front page
- How to group only VISIBLE posts? [closed]
- Shortcode with ‘year’ parameter
- search blog posts by author first name and or last name
- On what hook can I get the queried object’s final state?
- unique post in “$args” of wp_query display more than one post
- Modify this line to give alternate format date?
- How to display post list in a table layout (multiple queries in single loop)
- Not all posts showing in query
- Get all custom posts with a certain taxonomy
- Link to date_query results in WordPress
- Query function not executed between element [closed]
- When WP_Query only returns 1 post, how do I automatically redirect to that post?
- WordPress query portfolio posts
- Get latest author posts inside the loop
- Limiting post list by taxonomy
- Display 3 posts with different HTML markup using a loop
- How Can I Always Display A Particular Post First Using WP_Query?
- Get post publishing date from within custom HTML block
- How to show multiple posts thumbnail, title and date in widget
- Group first, 2nd, 3rd, etc posts by category terms
- Manipulated offset and pagination, can’t display last post anymore
- Function is printing twice – any suggestions?
- How to display particular set of wordpress post on a webpage?
- How to use two query result together in one loop
- show loop id post , only first id can read
- filter posts based on menu_order
- Show 5 posts and than 3 posts offset with pagination
- Change archive results based on GET request
- Wp_query loop is not working as it should
- Show all posts from the tags without having to set all of them
- Is it possible to query a category with specified posts?
- Is there a global page/post/product/anything ID?
- WordPress loop uses unmodified posts array, why?
- wp query custom orderby not custom field
- Skip posts, but keep posts per page
- Show posts between two Custom Fields date
- How to display an icon when a new post is published and then remove it when a specific time past?
- Query to get data of a post, if in category?
- Order posts by custom field
- Why I have this strange behavior when I try to exlude the featured post from posts visualization?
- Remove duplicated posts in the loop if post has more than one category
- How to organise post by category and date
- Retrieve latest post by multiple categories with ID
- Why I getting only 1 post?
- The next_posts_link() works only with original $wp_query
- How to change text (date) in post base on the day
- Limit amount of pages shown in pagination within wp_query
- First post in loop displays twice
- Get posts after calculating meta key
- how show post date for specific post?
- How do I get content of custom post type through post ID
- Filters do not work when there are multiple (one works)