Can you try using another date format? Example:
foreach ($blogs AS $blog) {
switch_to_blog($blog["blog_id"]);
$yesterday_today = array(
'order' => 'ASC',
'orderby' => 'date',
'date_query' => array(
array(
'after' => array(
'year' => date('Y',strtotime("-1 days")),
'month' => date('n',strtotime("-1 days")),
'day' => date('j',strtotime("-1 days")),
),
'before' => array(
'year' => date('Y'),
'month' => date('n'),
'day' => date('j'),
),
'inclusive' => true,
),
),
'posts_per_page' => -1,
);
//....
Related Posts:
- Get posts from Network (Multisite)
- Get Recent Posts by Date in Multisite
- switch_to_blog() performance considerations & alternatives
- Merging multiple wp_query objects
- WP_Query on different site in a multisite setup
- How to get post from all Blog Multisite to the Main Site?
- Get posts from the Main site to sub site – WordPress MultiSites Network
- How can i get the last post from wp multisite?
- Database Queries Optimization with new WP_Query
- WordPress multisite – fallback on subsites to main site on 404 and dealing with switch_to_blog function
- Need Help For WPQuery
- Multisite – Global CPT – advices?
- Multisite wp_query & switch_to_blog issue
- the_post() within switch_to_blog() altering my excerpt
- Create a notification for post field
- In a WordPress multisite configuration, how do I instruct WP_Query() to return posts from a sub-site?
- Problem with infinite scroll on multisite with custom query
- WP_Query with “post_title LIKE ‘something%'”?
- Best way to detect if you are in a SINGLE POST page
- How to do a wp_query using “BETWEEN” with two meta_values?
- Better way to get tag stats?
- Query two taxonomies via URL or link?
- How do I order pages and categories by ID or name in the same query?
- wp_query order by title
- Sort posts by custom taxonomy name
- How to adjust found_posts so that it accounts for offset and pagination
- Wp_query order by multiple custom fields?
- Would this post meta be better added to the post table rather than post_meta table
- Show default content if custom WP_Query has no posts
- meta_query on a date range using an array of values
- Pagination for custom query on single.php
- Get product list of given category
- Remove ellipsis from the excerpt retrieved using get_the_excerpt()
- Query Ignoring ‘exclude’ Parameter?
- How to prevent writing duplicate loops?
- merge two query arguments into one WP_Query call
- Adding a parameter to the default query
- Using WP_Query in “parse_query” or “pre_get_post” in Posts2Posts
- Taxonomy search/filter with multiple taxonomies and multiple taxonomy terms
- While creating Block Themes in WordPress, how can I query custom posts for an Archive view?
- How To Fix WP Query Returns Results But Shouldn’t?
- why update and delete query not worked in custom table?
- get_users is missing or skipping over users in loop
- Weird orderby => post__in issue
- how to handle multiple ajax wordpress queries?
- How to extract specific post
- wp_Qwery works to slow
- Search for “2nd” also returns “22nd” in wp_query
- 2 weeks ago from meta query meta value
- Running main loop 2 times with conditional statement
- paged variable not working for category/custom post archive
- How to output the title of the blogs home page
- Array as ‘key’ in WP_Query
- Reset WordPress Post Query to default
- Check the Specific Meta Key IF its Meta Value is Empty then… (WP Post Meta Query)
- Woocommerce – exclude only older out-of-stock items
- Searching for meta_key returns 0 posts
- Using custom taxonomies in a query
- ACF accessing a field from the query, but not in post
- Determining Author post count
- Is there a ‘compare’ option when using WP_Query apart from meta_query
- WP_Query returns different results from get_posts() [closed]
- How to pass query string vars between admin pages?
- Query posts by Post title
- WP_User_Query and user posts
- Why do I have to use pre_get_posts with custom WP_Query to reset posts_per_page?
- WP order ASC in custom author loop
- Custom Homepage Pagination using WP_Query
- My website is getting too many dierect home arechives and this is increasing my bounce rate
- Get list of all Grandchild Pages
- get latest added term from taxonomy and insert into php variable
- Featured images loop for Orbit Slider
- Posts limit on homepage (genesis framework)
- Trouble passing attribute into shortcode function
- WP_Query return posts in wrong order
- Exclude post with taxonomy and from the terms (taxonomy & tag) posts count
- WordPress search WP_Query to cover multiple post types and their custom fields?
- How do i create a custom post query when the meta value is an array?
- How to do WP_User_Query for Nested Array value Inside Nested Array field
- How to use jQuery validation to set the search bar to accept only a specific input?
- How to compare between two dates in a nested loop?
- How to query 5 users in random who have published more than 10 posts
- meta_query only check if both value are set
- post_type not working when tag__in is present?
- Seach and categories not working when ignoring sticky posts in main loop
- posts_per_page increment additional post
- 3 wp_query on one page with pagination for last query
- Display Count of posts
- Optimize WP_Query
- Add a custom variable to query page object
- Read more redirection problem
- Help in query for list links
- Multiple loops on index page with sticky post and pagination
- WP_Query issues with argument posts_per_page
- Search (Custom Form, Custom Search Result)
- Randomly display posts on a site hosted by WPEngine? [closed]
- tax_query not working properly with get_posts
- Elementor custom query
- Get access to all terms associated to each post that the wp_query loop displays
- How to retrieve _embed (etc) fields in get_posts custom query?