Forums

Join
bbPress Support ForumsTroubleshootingfetch RSS feed

Info

Tags

fetch RSS feed

  1. How can i grab the RSS feed from bbpress and show it on WordPress?

    I want to show the latest 3 comments in the format:

    title
    summary (max 10 plain text exerpt length)

    Thanks in advance,
    DKB

  2. get the rss feed from bbpress by adding "rss" to the forum url
    http://www.domain.com/bbpress/rss

    copy the rss feed url and paste it on the rss/feed widget in wordpress

  3. Sorry i meant on a template like on homepage.

  4. you can use rss widgets on the homepage... if you mean "hardcoding it" to the template use the following code:

    <?php if(function_exists('fetch_feed')) {
    include_once(ABSPATH.WPINC.'/feed.php');
    $feed = fetch_feed('http://www.domain.com/bbpress/rss');
    $limit = $feed->get_item_quantity(7); // specify number of items
    $items = $feed->get_items(0, $limit); // create an array of items
    }
    if ($limit == 0) echo '<div>The feed is either empty or unavailable.</div>';
    else foreach ($items as $item) : ?>

    <div>
    get_permalink(); ?>"
    title="<?php echo $item->get_date('j F Y @ g:i a'); ?>">
    <?php echo $item->get_title(); ?>

    </div>
    <div>
    <?php echo substr($item->get_description(), 0, 200); ?>
    <span>[...]</span>
    </div>
    <?php endforeach; ?>

    and edit the following:

    $feed = fetch_feed('http://www.domain.com/bbpress/rss');

    $limit = $feed->get_item_quantity(7); // specify number of items

    <?php echo substr($item->get_description(), 0, 200); ?>

  5. Thank you for the suggestion.

    With that code i get this:

    title

    first 10 words

    i want to have this:

    title
    first 10 words

    So there is too much spacing.

  6. You must log in to post.