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 am using WordPress Multisite:

Main site

--sub site

--sub site

What i need to anything publish to sub sites will auto publish on the Main site

Regards

share|improve this question
add comment

5 Answers 5

I've had good luck using this WP_Query_Multisite class on GitHub. It works just like WP_Query and has some additional arguments to restrict certain sites.

share|improve this answer
add comment

There is a very good plugin for this called WordPress MU Sitewide Tags by @donncha

You have the controls to:
- copy all content from sub-sites to parent blog
- copy all content from sub-sites to a trending blog
- excludes pages from being copied
- exclude blogs marked private
- copy custom post meta fields

There are also a few widgets and supporting plugins from people like @andrea-r and ron who do quite a bit of work on the WordPress.Org forums > Multisite.

You can see this plugin in action at http://wordpress.damien.co and then visit my parent site at http://damien.co

share|improve this answer
add comment

You can use the switch to blog function. Whatever you call within the function would be just like you are pulling in any content, but from that particular blog ID.

Codex -> http://codex.wordpress.org/Function_Reference/switch_to_blog

share|improve this answer
add comment

The ThreeWP Broadcast plugin allows you to cross publish posts, pages, and custom post types from your sub sites to the main site: http://wordpress.org/plugins/threewp-broadcast/

share|improve this answer
add comment

Someone else is due credit for this function. I can't recall where I found it.
If that guys gets here, thank you!

You need to:

Step 1 - Include / embed this function in your functions.php:
(I tried to paste it here but its too long...)

Step 2 - Embed the function in your index.php file:

<?php if (is_home()) {
    echo '<h1 class="homeTitle">'.esc_html__('New on My Blog Network', 'your_text_domain').'</h1>';
    echo '<ul class="recentPostsGlobal">';
    network_latest_posts($how_many=50, $how_long=0, $titleOnly=true, $begin_wrap="\n<li>", $end_wrap="</li>", $blog_id='null', $thumbnail=false, $cpt="post", $ignore_blog='null', $cat='null', $tag='null', $paginate=false, $excerpt_length='null', $display_root=false);
    echo '</ul>';
}
?>

You can define the amount of posts you would like to return and other stuff.

So... hope this helps ;) Cheers, Sagive

share|improve this answer
2  
Please can you add the required function in this post; maybe later is the pastebin deleted and then is the post nor usefull. Thanks. –  bueltge Oct 22 '12 at 8:36
add comment

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.