WordPress.org

Ready to get started?Download WordPress

Forums

Another Method for Displaying Network-Wide Recent Posts (1 post)

  1. davegregg
    Member
    Posted 2 years ago #

    I have a multisite network hosting a rapidly growing number of blogs (currently over 1400). I was using one of the plugin methods to pull the most recent posts for the network, but I decided to start thinking of a non-plugin method in order to reduce the resources my WordPress plugins were using. Here is one less-accurate, but extremely-resource-efficient and simple method of displaying the recent posts for a whole network in a single widget.

    First, I created a Google Alert that searches for this:
    -hello-world site:mymultsite.com "posted on" -inurl:tag -inurl:category
    I set "Volume" to "All Results" and "Deliver to" to "Feed".

    Second, I navigated to the feed in Googler Reader, clicked "Feed settings...", clicked "View details and statistics", and copied the "Feed URL".

    Third (optional), since the sites in my network have a consistent pattern of including the site name in the page title, like "Post Title | Site Name" (which appears as the item title in the feed), I set up a Yahoo Pipe with a RegEx expression to remove everything after the post title. In my case, I replaced
    (.*) \| .*
    with
    $1
    Then I just set up a filter to remove that initial "Google Alerts" item from the feed. Save, Run, and Get as RSS. Copied the resulting feed URL.

    Fourth, I used a simple RSS widget to pull the feed into WordPress.

    This method likely has a bit more of a delay than other methods, and may not be very accurate or consistent, but since I have no fear of people meticulously watching the widget for consistency, and my priority is resource load, this is a perfect solution for me. Make Google do all the work, I always say. :D

    If you have a better way of doing something similarly low-resource, let me know!

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by davegregg
  • This topic is not a support question
  • WordPress version: 3.3.1