• I have two blogs on one domain and I want to have the first post from each of them on the index. They’re both in subfolders and the index is in the root. Both blogs use the same database, but with different table prefixes. Right now, the code renders so that it displays the first post in blog1 twice instead of showing the first post from blog1 and the first post from blog2. I know enough about php to have a concept of what may be causing the problem, and I took a look at wp-blog-header & some of the files it calls to see if I could try chasing it down, but I’m not a php coder, and I just can’t track it down.

    The code I’m using right now is:

    <div class="blog1">
    <?php require('blog1/wp-blog-header.php');
            query_posts('showposts=1');
            while (have_posts()) : the_post(); ?>
          <a href="<?php the_permalink() ?>" rel="bookmark">
          <?php the_title(); ?>
          </a>
          <?php the_content(); ?>
          <?php endwhile; ?>
    </div>
    <div class="blog2">
    <?php require('blog2/wp-blog-header.php');
            query_posts('showposts=1');
            while (have_posts()) : the_post(); ?>
          <a href="<?php the_permalink() ?>" rel="bookmark">
          <?php the_title(); ?>
          </a>
          <?php the_content(); ?>
          <?php endwhile; ?>
    </div>
Viewing 1 replies (of 1 total)
  • Thread Starter thatwhichisneither

    (@thatwhichisneither)

    I still haven’t sorted this out, and I’ve done a little asking around. I’ll keep searching, but if anyone has any ideas I’d appreciate any leads.

Viewing 1 replies (of 1 total)
  • The topic ‘Referencing multiple blogs on one domain from index’ is closed to new replies.