query two different installs (1 post)

  1. colincameron
    Posted 9 years ago #

    I have two wordpress installations and in subdirectories and I would like to include the last five post titles from each on my main site.

    I can make the first work but the second list loads the first blogs links. Im assuming because I cant include the wp-blog-header.php twice.

    Can anyone think of a way to do this?

    this is the code im using for the first:

    // Query Andfound's WordPress install for last 5 posts
    define('WP_USE_THEMES', false);
    <dt>Recent Posts</dt>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <dd><a href="<?php the_permalink() ?>" title="get_the_title()"><?php get_the_title() ?></a></dd>
    <?php endwhile; ?>
    <?php else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif;

Topic Closed

This topic has been closed to new replies.

About this Topic