Since wordpress multisite uses different tables for all blogs, it is very inefficient to get all recent articles of all blogs (content aggregation) on display time since you have to query all blogs, sort the articles by date and display the ammount you need.
Plugins like WordPress Post Indexer (https://premium.wpmudev.org/project/post-indexer) additional write all posts into one central db table in the moment you insert or update them. From there, you can query them very efficiently.
I used the mentioned plugin by myself – its worth to try.
I’m not associated with the creator.
There are some things to consider too: For example: if you want display custom post meta fields, you’ll have to use switch_to_blog.
Related Posts:
- Get posts from Network (Multisite)
- switch_to_blog() performance considerations & alternatives
- Merging multiple wp_query objects
- How to get post from all Blog Multisite to the Main Site?
- Multisite wp_query & switch_to_blog issue
- the_post() within switch_to_blog() altering my excerpt
- When to use WP_query(), query_posts() and pre_get_posts
- WP_Query orderby date not working
- How to use the_posts_navigation for wp_query and get_posts?
- meta_query: using BETWEEN with floats and/or casting to DECIMAL
- How to order by post_status?
- get_template_part in for loop
- Is it possible to select against a post’s parent’s fields with WP_Query?
- Get posts by meta data OR title
- Get_post() with meta_key when compare is a date
- Function to check if author has posted within the last x days
- Use post__in and post__not_in together?
- WP_Query on different site in a multisite setup
- WP Query post meta value
- How can I hide posts that are over 2 years old
- Get all posts without tags
- How to find out what “Blog pages show at most” is set to [duplicate]
- How can i get the last post from wp multisite?
- Trying to check and see if a post has a featured image outside of the main loop
- Use meta_query to display events by date in custom field
- How to show recent and upcoming birthdays using meta_query
- Meta Query for specific months
- Get posts for last working week in WP_Query
- Create a sitemap without a plugin – get parent pages only?
- Complex date range with WP_Query and BETWEEN
- get_posts – find out if querystring was crap and fallback is used
- Comparing dates in custom field
- Get posts for which a custom field is not present, with get_posts
- Creating query to show which editor (classic or block) was last used to edit a post/page
- How to display upcoming events by dat with Modern Events Calendar Lite
- Orderby ASC changes to DESC in WP_Query
- Return Taxonomy/Term Information with Posts (WP_Query/get_posts)
- Help with WP_Query – Too many mySQL queries
- WordPress multisite – fallback on subsites to main site on 404 and dealing with switch_to_blog function
- add active class based on permalink and url
- Weird orderby => post__in issue
- Multisite – Global CPT – advices?
- Why does get_posts only show results for Admins or logged-out users?
- Conflict with get_posts and the_content
- Taxonomy and Date in same query?
- get_post_meta slowing down my page load (in a plugin)
- date_query seems to be ignored by wp_query
- WP Group posts by year(desc) > month(desc) > date(asc)
- How to show more post at a given category?
- Get posts by list of post IDs ordered by those IDs?
- Reset WordPress Post Query to default
- Best choice for multiple loop in page?
- Get all posts which was posted on X Days WordPress
- Query post with meta value in set of values
- meta_query: check if number exists
- Use WP_Query or query_posts() or get_posts() for optimizing a site?
- get_posts always returning the same number of posts = 5
- “paged” in WP_Query returns 0 posts
- Specify strict ‘order by’ in WordPress query
- How I can change the condition or compare operator for WP_Query in pre_get_posts
- Check if searched number is within the post meta value
- Filtering posts by archive showing all years
- get_posts custom field
- How to apply a function to a metadata value before launch a WP Query?
- Woocommerce: order posts by meta key
- WP_User_Query and user posts
- Ordering posts by custom field and grouped by month
- Limit loop to future events
- How to access $wp_query object from array of posts given by get_posts?
- Show single posts date, in a page of posts
- Added Date Filter To Popular Posts Query
- Why always one post missing
- Magazine style frontpage with multiple categories/loops and no duplicate posts
- How to add date_query to meta_query array
- Why my query is not “Main_query”?
- Facing problem with tax_query results
- Related posts queries
- Comparing Meta Field date in WPQuery using Meta_Query?
- How to get only present and past posts with post_date
- Different query result on local and server
- get_posts query caching?
- Get posts with any value in attribute
- Get posts by birthday
- Slow query when selecting with large meta query or post__in
- how to avoid reloading/refresh the page when displaying the post of wp_list_categories
- Problem with infinite scroll on multisite with custom query
- Display posts from catagories
- Both WP_Query and get_posts returning 1 post
- When should you use WP_Query vs query_posts() vs get_posts()?
- Get post closest to today
- Weird query with get_posts and WP_Query
- orderby and order filter in get_posts or WP_query function in wordpress not working
- tax_query not working properly with get_posts
- Query custom post types by meta field in a term from custom taxonomy
- How to replecate the _fields parameter in custom REST api endpoint
- WordPress extremely slow when using get_posts with multiple meta_query relations
- Empty query on Custom Post Type, using WP_Query or get_posts
- A Depth Like Parameter For “get_posts”
- WP_Query sort by ACF date field (newest first) with blank dates first
- Sort by multiple columns using get_posts