WordPress.org

Ready to get started?Download WordPress

Forums

Integrate WordPress Feed with Non-WP site (6 posts)

  1. KonaFan
    Member
    Posted 9 years ago #

    Hi,

    I am having trouble pulling my WordPress feed into my non-WP site. Would like the most current post from my WP blog to appear on my non-WP site. Any ideas how to do this?

    Thanks!

    KonaFan

  2. vkaryl
    Member
    Posted 9 years ago #

    There are various articles (find using the search function, upper right) about this over the last few months. Search for "The Loop" and "CG Feedread".

  3. davidchait
    Member
    Posted 9 years ago #

    Heh, a lot of folks trying to figure this out.

    You can use something like my CG-FeedRead script/plugin, and just show 1 post from the feed. Just grab the CG-PowerPack of scripts, and set it up on your website (copy the files up, make the cg-plugins/cache_feedread folder writeable...).

    Then, you just do something like this on your main PHP page:

    $path = dirname(__FILE__).'/';
    $plugin = 'wp-15/wp-content/plugins/cg-plugins/cg-feedread.php';
    if (file_exists($path.$plugin))
    {
    include($path.$plugin);
    if (function_exists('getSomeFeed'))
    {
    $feedUrl = "http://www.chait.net/wp-rss2.php";
    $feedOut = getSomeFeed($feedUrl, 1, 1, "feed-cdn");
    if (!empty($feedOut)) echo $feedOut;
    }
    else
    echo "CG-FeedRead script didn't initialize properly.";
    }
    else
    echo "Couldn't access CG-FeedRead script.";

    $refplugin should point to the sub-path all the way down to the cg-feedread.php script.

    The 'feed-cdn' string can be any identifier for the feed's cache file.

    The first [1] is to pull just one item. If you want more than one, use a higher number.

    The second [1] is a 'styling' thing. If in main body area, use 1, if sidebar probably use 0.

    The system CACHES the content. So once cached, it won't refresh, even if you change options, until the cache expires. You can try passing an empty string for the cache file identifier, or if you need to play with stuff I can show you how to set the cache-refresh to something 'silly', like 5 seconds.. ;)

    -d

  4. KonaFan
    Member
    Posted 9 years ago #

    Thanks for the responses. I found a simpler solution over at http://www.globalsyndication.com/rss-parser

    use the location of wp-rss.php on your server for the URL and viola! It creates the necessary code you need. Drop it into your site anywhere, or call it as an include.

    It will auto update as you add new posts.

  5. larry5273
    Member
    Posted 8 years ago #

    I tried to set up the rss-parser and it just won't work for me. Is there some setting or something that I missed.

  6. jr
    Member
    Posted 8 years ago #

    made a comment on "the daily breif".
    tried to save and then retrieve my "blog"
    i somehow got your website and signed up.
    i am recently (temporarily) disabled.
    how do i become a blogger?

Topic Closed

This topic has been closed to new replies.

About this Topic