WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] get posts from blogs to apear in the main wp site? (4 posts)

  1. afdownload
    Member
    Posted 4 years ago #

    dear guys,

    i have a wp site that has about 7 subdomains. i have installed wp 3.0 multi sites but there's only one problem.
    is there a way that i can call posts from the sub sites to appear in the main site?
    for example the blogs are movies, music, software and .... but I want all the posts in the blogs to appear in the main one.
    please help me out this is too important for me

  2. Use this plugin:
    http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/

    It's a little mis-named, but it does what you want. I've used it on many sites to pull all the posts to the main site. like here: homeschooljournal.net

    Make a folder in your wp-content folder called mu-plugins. Put this plugin file in it, not in a subfolder, just the php file.

    Now go to Super Admin -> Option. there will be a checkbox at the bottom of the page to enable it. Save and now you'll see more option. tell it to use the main blog.

    From the point of installing onwards, this plugin will pull a copy of each new post and duplicate it on the main blog. the original post's permalink is retained so there isn't duplicate content.

  3. afdownload
    Member
    Posted 4 years ago #

    dear andrea

    thanks for answering, but this is something a bit different than what I wanted. i just want to call the posts from blogs to appear in the main site, something just like rss. i do not want to copy the content or recreate it.

    the problem is that RSS would only show the title of the post, but i want the title, the excerpt, and some custom field values to show up from the blogs in the main site.

    like this peace of code that i have in my template which works fine with the main site, but the different is that I want it to get content from a blog not the main site. since the main site and the blogs are in the same database with just different table prefix i think this should be possible.

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <?php the_title(); ?>
    <a href="<?php the_permalink() ?>"><img src="<?php echo get_post_meta($post->ID, 'thumb',true); ?>" />
    <?php the_excerpt(); ?>
    
    <?php endwhile; else: ?><?php endif; ?>
  4. It *is* possible. the plugin I sent above will do it. Just change your template on the main blog to show the excerpt instead of the content.

    Like this: http://homeschooljournal.net

Topic Closed

This topic has been closed to new replies.

About this Topic