Forums

Posts from 2 WP blogs on external site (7 posts)

  1. Daffydd57
    Member
    Posted 2 years ago #

    Hi all,
    I'm wondering, considering that you must pull the wp-blog-header.php into the external page, if this could be done for multiple WP blogs.

    My attempts to do so resulted in posts only from the 1st include on the page - first come-first serve I guess?

    Is there a way to do this?

    Something like:

    <?php
    // Include WordPress #1
    require('sportsblog/wp-blog-header.php');
    query_posts ('cat=5&meta_key=priority&orderby=meta_value&order=ASC');
    ?>
    
    <?php
    // Include WordPress #1
    require('wpnews/wp-blog-header.php');
    query_posts ('cat=5&meta_key=priority&orderby=meta_value&order=ASC');
    ?>

    My PHP/MySQL is not very good so I may be just missing a trick.

    Thanks so much for any advice! :)

    Daf

  2. Daffydd57
    Member
    Posted 2 years ago #

    Anyone?

    I guess I could use simplepie to bring in any additional blogs' info but it's decisively slower than the loop method.

    Thanks

  3. Daffydd57
    Member
    Posted 2 years ago #

    Anyone know if, for the second blog, header.php could be changed to header2.php and all references to it changed to find it would work? in other words - the second blog would be operating with header2.php throughout...

    <?php
    // Include WordPress #1
    require('sportsblog/wp-blog-header.php');
    ?>
    
    <?php
    // Include WordPress #2
    require('wpnews/wp-blog-header2.php');
    ?>

    Thanks for any thoughts on this.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    I haven't set up for 2 blogs like that so I'm not sure

    just making sure you are clear that it's not referring to header.php from your theme

    It's referring to wp-blog-header.php which is a core WP file in your WP root

    I would think changing it's name would make WP very unhappy....but again...no experience in it.....

  5. Daffydd57
    Member
    Posted 2 years ago #

    Hi RVoodoo,

    Thanks for the reply - I did realize that. I was thinking that if I went into every file, did a search and replace, and changed every instance of wp-blog-header.php to wp-blog-header2.php that it might work - otherwise you are right on about WP being quite angry about the change. ;)

    Thanks again!

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    yeah....thing with changing that all up like that is, you'll lose the changes on every WP upgrade....which seems like a giant headache. But not updating WP is an even gianter headache! (It only took me getting hacked once to learn that lesson)

  7. Daffydd57
    Member
    Posted 2 years ago #

    Yes - good point on the upgrading. That would be TOO big of a headache. ;)

Topic Closed

This topic has been closed to new replies.

About this Topic