• Resolved turfnet

    (@turfnet)


    My main site (non-WP) links to three different WP blogs. I want to port the excerpt of the latest post from each blog to my home page (main, non-WP site). I’m using this code:

    <?php // Include WordPress
    define('WP_USE_THEMES', false);
    require('./blogname/wp-blog-header.php');
    query_posts('showposts=1');?>

    which works fine for an excerpt from one blog. When I include an excerpt from a different blog, changing the blogname in the code accordingly, one excerpt shows up in both places.

    Take a look here: http://www.turfnet.com/index_WPexcerpt.php

    The same excerpt is showing up in both places, even though the code has been changed.

    What do I need to change to show excerpts from three different blogs on this one page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Why not use RSS? Magpie RSS – PHP RSS Parser. Many more features than query_posts.

    Thread Starter turfnet

    (@turfnet)

    I took a look at Magpie RSS and frankly, as a shoemaker web guy, don’t know where to start. Any guidance?

    Thanks.

    Never heard the phrase “shoemaker!” You need to install the magpie php scripts and then include them on the page where you want the news feeds. From your page source, I can’t tell what you use to run your site, but it is php. It’s not particularly easy; if your current site was also based on WordPress, a plugin called FeedWordpress FeedWordPress would do it all.

    With your current method, you can try <?php wp_reset_query(); ?> after each query; that should reset each query so you don’t get dupes. But using wp_reset_query may need a more complex loop then you are using.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Excerpts from 3 different blogs on one non-WP site’ is closed to new replies.