The following code gives all posts from the network.
What I am trying to achieve :
- Select which blogs to display (by ID)
- Select how many post to display (My code selects how many post per blog)
-
Order by date or random
$blogs = get_last_updated(); foreach ($blogs AS $blog) { switch_to_blog($blog["blog_id"]); $lastposts = get_posts('numberposts=3'); foreach($lastposts as $post) : ?> <a href="https://wordpress.stackexchange.com/questions/257024/<?php echo get_permalink(); ?>"><?php the_title(); ?></a></h3> <?php endforeach; restore_current_blog(); }