WordPress.org

Forums

Displaying blog posts from "child" sites (8 posts)

  1. Eternal Sky Chaz
    Member
    Posted 4 years ago #

    Hi!

    I want to set up a multisite and have a post appear on the main site every time I open a new network site AND have a post every time I put a new post up on one of the network sites.

    WPMU used to do this from the home.php page, but I can't seem to get that to work on WP Multisite.

    Any ideas on how I can get this to work? Or am I just missing something that is already there?

    Should I post this functionality as a suggestion in the Suggestions subforum?

    Thanks!

  2. WPMU used to do this from the home.php page

    Never did. Your theme might have, but that's not a function of built in WordPress.

    http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/

  3. Eternal Sky Chaz
    Member
    Posted 4 years ago #

    Thanks. I'll check this out over the weekend.

  4. Correct. The old WPMU had a code snippet on the home.php.

    Also, it did not show actual posts, just a list of the latest updated blogs.

    use SWT. :)

  5. Eternal Sky Chaz
    Member
    Posted 4 years ago #

    Oka, I installed and Network Activated the plug in, and followed the instructions to make sure there was a posts loop in my home.php page and I am still not getting posts from the other blogs published on the main page and selected to have the posts show on my main page for the main blog.

    I have reading set to display my posts on the front page.

    Any ideas about why this isn't working properly?

  6. Are the sub sites public?

    Did you post a new post to any of the sub sites?

  7. Eternal Sky Chaz
    Member
    Posted 4 years ago #

    Finally, it did start working but it was kinda bizarre as it wouldn't show posts properly at first, but started working correctly the next day, even with fresh posts.

    There's one more thing I am working on with this. I would like to be able to display the blog name associated with each post. I assumed that the plugin would do that, but all I am getting is the post title. Here's the code I am using for home.php:

    <?php
    if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
    
    <a href="http://<?php echo $details[ 'domain' ] . $details[ 'path' ] ?>"><?php echo get_blog_option( $details[ 'blog_id' ], 'blogname' ) ?></a><br />
    
    <a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>" target="_blank" rel="bookmark"><?php the_title();?> </a>
    
    <?php the_content(''); ?>
    
    <?php endwhile; ?><?php endif; ?>

    I was originally thinking that

    <a href="http://<?php echo $details[ 'domain' ] . $details[ 'path' ] ?>"><?php echo get_blog_option( $details[ 'blog_id' ], 'blogname' ) ?></a>

    would automatically display the blog associated with a particular post, but it only displays the main blogname.

    Am I going to have to try to edit the plugin to show the blog name as well?

  8. yes.

    or edit the template to pull the blog name.

Topic Closed

This topic has been closed to new replies.

About this Topic