2

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

1

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.

  • This class would answer to the question, I'll test if it's working. The question is asking to display the posts, not to copy the post to parent site. I'll update the result. – Osify Apr 24 '15 at 8:41
1

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/

1

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

  • 3
    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
1

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.

0

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

  • This plugin seems abandoned at the moment. – Patrik Alienus May 29 '18 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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