WordPress.org

Ready to get started?Download WordPress

Forums

How to Display post topics on non wordpress site (5 posts)

  1. lump
    Member
    Posted 6 years ago #

    I'm setting up a WordPress site on own server and want to feed latest blog post headlines and categorised blog post headlines onto a different site (which sits on the same server).

    When people click onto a headline it takes them back to the blog from the non wordpress site.

    Is there a widget that does this?

    BTW, I'm new to this WordPress stuff.

  2. MrMyles
    Member
    Posted 6 years ago #

    Ditto. I need to do this exact same thing. I have seen it done, but did not see how.

  3. MrMyles
    Member
    Posted 6 years ago #

    A bump for lump.

    Anyone know how to do this. Google search turns up everything but the right answer.

    Knowledgebase search turns up a possible answer, but it failed when I tested it.

    <h2><?php _e('Headlines from AP News'); ?></h2>
    <?php // Get RSS Feed(s)
    include_once(ABSPATH . WPINC . '/rss.php');
    $rss = fetch_rss('http://example.com/rss/feed/goes/here');
    $maxitems = 5;
    $items = array_slice($rss->items, 0, $maxitems);
    ?>
    
    <ul>
    <?php if (empty($items)) echo '<li>No items</li>';
    else
    foreach ( $items as $item ) : ?>
    <li><a href='<?php echo $item['link']; ?>'
    title='<?php echo $item['title']; ?>'>
    <?php echo $item['title']; ?>
    </a></li>
    <?php endforeach; ?>
    </ul>

    Thoughts / Suggestions / Comments / Questions

  4. moshu
    Member
    Posted 6 years ago #

    MrM,
    what you posted above should work the other way around: displays RSS feed on a WP site - but doesn't display the feeds of a WP blog elsewhere, since it is using internal WP code!
    There are many gizmos around on the net that would display feeds on any site - all depends on what kind of files you have (html or php).

  5. esscott
    Member
    Posted 6 years ago #

    I am posting this because I too searched for a LONG time to find a soltion to the same issue. Try:

    http://feed2js.org/index.php?s=download

    You install it on our server and it will generate code for as many feeds as you like - it worked great for me. Even though you have to install it on your site, it is easier than configuring most of the other options I looked at.

Topic Closed

This topic has been closed to new replies.

About this Topic