Loading 2 Blogs with require_once(‘wp-load.php’)
-
If I have 2 blogs, xyz.com/a/ and xyz.com/b/, and in xyz.com/index.php I want to display 3 latest posts from a and 3 from b, how do I do it?
Showing posts from one blog is easy:
<?php
define(‘WP_USE_THEMES’, false);
require_once(‘a/wp-load.php’);
query_posts(‘posts_per_page=3’);while (have_posts()): the_post();
… ?>After this, how do I switch from blog a to blog b in the same script? Thanks.
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Loading 2 Blogs with require_once(‘wp-load.php’)’ is closed to new replies.