Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to list all the latest x posts from the whole Network in my WordPress Network. I am already using the Sitewide Tags plugin to collect all posts in a separate blog, but I also need to list the latest posts elsewhere.

Most scripts and plugins I have been looking at only list one post from each blog, but I need to list the latest X posts, sorted by date, and allow several posts from each blog site.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Have you considered using Sitewide Tags to populate one blog, then using the RSS feed from that blog to display the lastest posts wherever you need them?

share|improve this answer
    
Thanks, I don't know why I didn't think about that in the first place. Obviously the simpliest solution. –  Martin Aleksander Jan 22 '12 at 13:32

I could write a code here but it's already well written elsewhere - there is a bunch of example but ready to use multisite plugins by Brad Williams available to download from: Code Download for Chapter 15 [zip]. It's intended to accompany his Professional Plugin Development Book but it's available for free download and could serve you well even without the book.

Especially these two plugins from the pack will be helpful:

  • boj-multisite-latest-network-posts.php
  • boj-multisite-widget.php

You could be able to use them straight away or make it suite your liking with just a few simple modifications.

The most important and helpful functions for your use case are:

And don't hesitate to ask if any of these functions or techniques used in the plugins needs more explanation...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.