• I have two blog installs sharing a single database with different table prefixes; there is a different set of users for each blog, but same theme & domain; blog2 is installed in a subfolder.

    I need to develop a zine-style front page for blog1 that incorporates content from blog2. I don’t think RSS will give me enough flexibility with the data, which I should be able to call directly. After trying a few different solutions, I thought of simply redefining $table_prefix and doing a wp_query for each:

    $firstQuery = new WP_Query('posts_per_page=5');
    while ($firstQuery_a->have_posts()) : $firstQuery->the_post();

    –display stuff–
    endwhile;

    Works fine for blog1. Then I redefine $table_prefix = prefix2_ before setting up my $secondQuery same as above. For some reason, I still get the posts from blog1 in my$secondQuery`

    Am I missing something, or is there a better way to achieve the same result?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘multiple blogs – content from blog2 displayed in blog1’ is closed to new replies.