Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Problem with bbPress RSS feed

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #31475
    WizenOak
    Member

    Hey guys,

    This is the first time i’ve used WordPress as a CMS, the first time i’ve used PHP and the first time i’ve dealt with RSS feeds so i’m a little stuck!

    Basically, i’m using an RSS feed from my bbPress forum and displaying the “Latest Topics” on my WordPress theme. This is what i’m trying to display on my WordPress template:

    [Title of the post]
    by [Author of the post] [Date of the post] [Displays amount of posts in the topic and also links to the thread page]

    Now, here is the rss2.php file relating to the bbPress feed.

    
    header( 'Content-Type: text/xml; charset=UTF-8' );
    echo '<' . '?xml version="1.0" encoding="UTF-8"?' . '>' . "n";
    bb_generator( 'comment' );
    ?>
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">

    <?php echo $title; ?>






    <![CDATA[<?php _e('Search'); ?>]]>
    ]]>
    q






    <?php topic_title( $bb_post->topic_id ); ?>

    false ) ); ?>

    @
    topic_id ); ?>








    Here is the code i’ve inputed into my WordPress theme (so far):

    
    
    include_once(ABSPATH . WPINC . '/feed.php'); // include the required file
    $feed = fetch_feed('http://localhost/wordpress/bbpress/rss.php?topics'); // specify the source feed
    $limit = $feed->get_item_quantity(4); // specify number of items
    $items = $feed->get_items(0, $limit); // create an array of items

    } ?>





    • The feed is either empty or unavailable.








    • get_title(), 0, 30); ?> ...



      get_date('D, d M h:i'); ?>

      get_link(); ?>">Link">get_description(); ?>





    This displays the following on my site:

    [Title of the post]
    [Date of the post] [Displays amount of posts in the topic and also links to the thread page]

    My problem is i don’t know how to fetch the author from the dc:creator tags? I’ve tried putting within the title tags after the topic_title in the rss2.php file but i don’t know how i can get the line break so the author appears below the title. Does anyone know how to solve this?

    Thanks.

Viewing 1 post (of 1 total)
  • The forum ‘Other’ is closed to new topics and replies.