How to Display User’s Blog Posts Feed on your Main Page

Posted by WordPress Modder under Plugins, how to

As a regular WPMU Forum visitor, reader, and contributor ( when I can add value ), I see this question asked often. I have found many threads that offer some great hints and advice, and basically tell you exactly what to do, but all the information wasn’t in one place. So, here it is.

How to Display your WPMU User Blog’s Posts on your Main Page:

1. Download, Read the Directions, and Install the WPMU Sitewide Feed Plugin - ITDamager.

2. Go to Blue-Anvil.com and read this post that details how to fetch RSS feeds with WordPress.

3. Make the necessary changes to the RSS feed path to point to your Sitewide feed ( http://yoursite.com/wpmu-feed/ )

4. Take what you’ve learned and edit the page template in your WPMU installation where you want your Sitewide RSS feed to display.

To help me learn, I try never to copy and paste. Rather, I type out the code by hand and that helps me get familiar with the code. Unfortunately, it also makes me more susceptible to typing errors;)

Here’s an image of the code that worked for me:

Of course, after you get the latest blog posts to display, you’ll want to wrap some style elements around it and maybe make some other changes, but that’s the basic functionality.

I hope this was helpful. I’m sure more experienced WPMU’ers could add more to this, or even provide another method, but this is what worked for me.

6 Responses to “How to Display User’s Blog Posts Feed on your Main Page”

  1. Andrea Says:

    Yep, it’s a handy tip. Just to add to that, the sitewide feed plugin also has a sitewide comments feed. Do the same thing and PRESTO.

    Great way to show comments to everyone and encourage more.

    Edit: this is also what people mean when they say “parse the feed”.

  2. aaron Says:

    Hi,

    Thanks for the great tutorial. I’m having trouble repeating this though. I’m rather new to php and I keep getting the error:

    Parse error: syntax error, unexpected T_VARIABLE in [...]/wp-content/themes/default/index.php on line 32

    I’ve typed and retyped the code above and even tried pasting the code from blue-anvil directly into the index.php of two separate templates (including the default one). Is there something I’m doing wrong?

  3. IndieLab Says:

    aaron,

    What is the line on code on line 32? Is it missing a semi-colon maybe?

  4. Terni Says:

    I’m not a PHP coder (I’m an ASP one) but if the intent of line 18 is to revert back “&” to it’s original status, I think the corret sequence to replace would be:
    “&”,”&”

  5. Terni Says:

    I have to put spaces…. remove them:

    “& a m p ; a m p ;”,”& a m p ;”

  6. Andreas Says:

    Is there any example of a site on the WEB using this possibility ?

    I ´d like to bring latest entries to the main blog (Preview of posts with text&pictures ?) and I now search for useful ideas/plugins.

    Kind regards,

    Andreas

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image



google.load("language", "1"); var curstate = 0; var hasloaded = 0; function bnc_show_translated() { if (hasloaded == 0) { bnc_lang_callback(); hasloaded = 1; } for (i = 0; i < 6; i++) { var elem = $("bnc_original_" + i); if (elem) { if (curstate) { elem.show(); } else { elem.hide(); } } } for (i = 0; i < 6; i++) { var elem = $("bnc_trans_" + i); if (elem) { if (curstate) { elem.hide(); } else { elem.show(); } } } if (curstate) { $("bnc_trans_state1").show(); $("bnc_trans_state2").hide(); curstate = 0; } else { $("bnc_trans_state1").hide(); $("bnc_trans_state2").show(); curstate = 1; } } function bnc_detect_div(div_id) { var text = document.getElementById(div_id); if (text) { text = text.innerHTML; if (text.length > 0) { google.language.detect(text, function(result) { if (!result.error) { if (result.language != "en") { if (result.confidence > 0.25) { $("bnc_translating").show(); bnc_xlate_div(result.language, div_id, "en"); } } } } ); } } } function bnc_xlate_div(src_lang,div_id,o_lang) { var text = document.getElementById(div_id); if (text) { text = text.innerHTML; google.language.translate(text, src_lang, o_lang, function(result) { var translated = document.getElementById(div_id); if (result.translation) { translated.innerHTML = result.translation; } }); } } function bnc_lang_callback() { bnc_xlate_div("en", "bnc_lang_i_0_96", "en"); bnc_xlate_div("en", "bnc_lang_i_1_96", "en"); bnc_xlate_div("en", "bnc_lang_i_2_96", "en"); bnc_xlate_div("en", "bnc_lang_i_3_96", "en"); bnc_xlate_div("en", "bnc_lang_i_4_96", "en"); bnc_xlate_div("en", "bnc_lang_i_5_96", "en"); bnc_xlate_div("en", "bnc_lang_i_6_96", "en"); bnc_xlate_div("en", "bnc_lang_i_7_96", "en"); bnc_xlate_div("en", "bnc_lang_i_8_96", "en"); bnc_xlate_div("en", "bnc_lang_i_9_96", "en"); bnc_xlate_div("en", "bnc_lang_i_10_96", "en"); bnc_xlate_div("en", "bnc_lang_i_11_96", "en"); bnc_xlate_div("en", "bnc_lang_i_12_96", "en"); bnc_xlate_div("en", "bnc_lang_i_13_96", "en"); bnc_xlate_div("en", "bnc_lang_i_14_96", "en"); bnc_xlate_div("en", "bnc_lang_i_15_96", "en"); bnc_xlate_div("en", "bnc_lang_i_16_96", "en"); } function bnc_startup() { bnc_xlate_div("en", "bnc_translate_info", "en"); bnc_xlate_div("en", "bnc_translate_info2", "en"); bnc_detect_div("bnc_lang_i_0_96");bnc_detect_div("bnc_lang_i_1_96");bnc_detect_div("bnc_lang_i_2_96");bnc_detect_div("bnc_lang_i_3_96");bnc_detect_div("bnc_lang_i_4_96");bnc_detect_div("bnc_lang_i_5_96");bnc_detect_div("bnc_lang_i_6_96");bnc_detect_div("bnc_lang_i_7_96");bnc_detect_div("bnc_lang_i_8_96");bnc_detect_div("bnc_lang_i_9_96");bnc_detect_div("bnc_lang_i_10_96");bnc_detect_div("bnc_lang_i_11_96");bnc_detect_div("bnc_lang_i_12_96");bnc_detect_div("bnc_lang_i_13_96");bnc_detect_div("bnc_lang_i_14_96");bnc_detect_div("bnc_lang_i_15_96");bnc_detect_div("bnc_lang_i_16_96"); } google.setOnLoadCallback(bnc_startup);
Close
E-mail It
This blog has been fine-tuned with 13 WordPress Tweaks.