WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Home Page for Multisites (10 posts)

  1. AMuhammad
    Member
    Posted 3 years ago #

    Hi Everyone,
    I am using 3.0.1 and i have made multisites by using wordpress-MU. Now i want a homepage that can include the links to all Multisites and also the latest post for each Multisite.

    Something like the url below.
    http://www.marthastewart.com/blogs

    Thanking in anticipation.

  2. AMuhammad
    Member
    Posted 3 years ago #

    I already played a little bit with this one. I am getting the latest posts from all the Multi Sites. But i want links to my Multi Sites with only 1 latest post.

    For Example : I have 1 main blog and 2 multisites like.
    http://www.xyz.com/wordpress (main blog)
    http://www.xyz.com/wordpress/site1
    http://www.xyz.com/wordpress/site2

    I want my homepage(www.xyz.com/wordpress) to contain links to both my Multi Sites with 1 latest post each. If i have 20 posts in site1 and 10 in site2 than i want to see the links for 20th and 10th post only with the site1 and site2 links.

  3. Hmm. Well there's this: http://wordpress.org/extend/plugins/wordpress-mu-featured-posts/

    But I just use some PHP shenanigans to show the last three posts. The downside to this is it's manual, though I suppose you COULD write a for/loop for it. For all blogs, do this...

    <h2>Recent posts at <a href="<?php echo get_blog_option(1, 'siteurl'); ?>"><?php echo get_blog_option(1, 'blogname'); ?></a></h2>
    <p><?php echo get_blog_option(1, 'blogdescription'); ?><p>
    
    <?php switch_to_blog(1); wp_cache_flush(); ?>
            <?php
                    global $post;
                    $myposts = get_posts('numberposts=3');
                    foreach($myposts as $post) :
                    setup_postdata($post);
            ?>
    
    <div class="fp-list-blog">
    <a href="<?php echo get_post_meta($post->ID, "url", true); ?>/"><?php the_post_thumbnail( array(90,90) ); ?></a>
    </div>
    
        <p><strong><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></strong> -- <small><?php the_date(); ?></small></p>
        <?php the_excerpt(); ?>
        <div style="clear:both;"></div>
            <?php endforeach; ?>
    <?php restore_current_blog(); ?>

    This guy did it with some SQL calls: http://thejudens.com/eric/2009/08/wordpress-mu-list-blogs/

  4. *fistshake at having to reinvent the wheel!*

  5. It's an okay plugin for really really small sites.

  6. AMuhammad
    Member
    Posted 3 years ago #

    Nice widgets the Diamond ones. But still is there a way to get this information on HomePage by using some plugin.

  7. Short codes are available in that plugin, you know. Make a static home page and then call the shortcode.

    Posts/Pages shortcode support (read more at the admin page)

  8. AMuhammad
    Member
    Posted 3 years ago #

    Thank you very much both of you.
    Just exploring it a bit more.

Topic Closed

This topic has been closed to new replies.

About this Topic