Posting two Wordpress blogs on one page
Posted: Fri Jun 24, 2011 9:28 am
I am trying to intergrate two blogs into the same pages using the following code
however it only brings up the posts from the first blog and I need the first 5 from both.
any ideas how I can run both scripts separately on the same page two display both blogs.
Code: Select all
<?php
// Include WordPress
define('WP_USE_THEMES', false);
require('../../blog/wp-load.php');
query_posts('showposts=5');
?>
<?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; ?>
<?php
// Include WordPress
define('WP_USE_THEMES', false);
require('../../Company_Blog/wp-load.php');
query_posts('showposts=5');
?>
<?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; ?>
any ideas how I can run both scripts separately on the same page two display both blogs.