WordPress.org

Forums

[resolved] Recent Entries from Blogs in Network on CustomHTML Home Page (5 posts)

  1. lilven8
    Member
    Posted 2 years ago #

    Hello all,

    I have been trying to figure this out for about a month and I feel like I'm close but just need a bit more information. So I have a network of about 4 to 5 blogs on my site http://www.themodernmixtape.com. I made the home page a static html page and everything looks good except for the "recent entries" section. I am trying to place the 1 most recent entry from each of the 4 extra blogs (the main page is also a wordpress blog but I am not using it as such).

    I came across a site that showed me how to pull the content from the MAIN blog but that's not what I need. For example my network urls are like this:

    http://www.themodernmixtape.com
    http://www.themodernmixtape.com/theart/
    http://www.themodernmixtape.com/theblog/
    http://www.themodernmixtape.com/thefavs/
    http://www.themodernmixtape.com/theeco/

    Basically the code that I was told to put in my html was:

    <?php
                                // Include WordPress
                                define('WP_USE_THEMES', false);
                                require('http://themodernmixtape.com/wp-load.php');
                                query_posts('showposts=1');
                                ?>

    at the top of my page, and then to use:

    <?php while (have_posts()): the_post(); ?>
                                <h2><?php the_title(); ?></h2>
                                <?php the_excerpt(); ?>
                                <p><a href="<?php the_permalink(); ?>">Read more...</a></p>
                                <?php endwhile; ?>

    at the location where I want the content to show up.

    This worked to an extent, as it did pull up the one most recent entry BUT FROM MAIN BLOG which I'm not even using as a blog itself.

    Can anyone help me figure this out if possible? Plllleeeassse!

  2. lilven8
    Member
    Posted 2 years ago #

    Thanks for the quick response Ipstenu, I have installed it but I'm not sure what to do from here as the authors didnt provide much help. I checked and installed as per the instructions.

  3. Install it. Set your MAIN site as the tags blog.

    Then when you make a new post, it'll show up there too :)

  4. lilven8
    Member
    Posted 2 years ago #

    Awesome works great! thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic