Multisite global posts loop with thumbnails and pagination.

I was wondering if anyone here has created a global posts loop like that seen on the network theme or which has pagination on the server side rather than having to bring down all the posts on the front end and paginate using JS? I am guessing this can be acheived using the Post Indexer plugin but I have been unable to find any specific examples.


  • DavidM
    • DEV MAN’s Mascot

    Hi Nick,

    I hadn't really taken a close look into it myself until now and if it helps, you'll find the homepage featured content rendered by network/library/components/feature-content.php which references network/library/functions/custom-functions.php, most specifically get_recent_posts().

    Taking a look at those, you can see how to build something similar. Personally, I think it's the layout and integration of the data with the layout that's the tough part and the theme takes care of all that for ya! :slight_smile:


  • Nick Ryall
    • Flash Drive

    Thanks for the response David.

    For anyone who's interested, I ended up using a plugin called "Site wide tags" to pull in all the posts across my network into a global "tags" blog. I was then able to query that blog using a standard loop on my homepage.

    The benefits of this approach is that I wanted to be able to manually select which posts would be featured on my home page (much like and using this method I could assign the posts I wanted to a specfic category (such as 'featured') and filter my loop on it. I can also make any modifications to the post, such as create a new featured image, without affecting the original blog. All permalinks point to the original post.

    The negatives include having to import new posts periodically into the tags blog. But this can be done at the click of a button before selected your featued posts each day. The 'tags' blog itself if set to be private however I guess it is still taking up DB resources and may also cause problems if posts over the network grew to a large amount.

    Anyways, I though this may be of use to someone trying to acheive the same thing.

  • DavidM
    • DEV MAN’s Mascot

    Hi Nick,

    Yeah, that's definitely useful to have posted as a solution. Having the blog marked as private ought to help avoid duplicate content issues but yeah, it could potentially become a DB hog unless you keep an eye it.

    Thanks for posting your solution!
    - David

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.