Skip to:
Content
Pages
Categories
Search
Top
Bottom

How would I add the latest topics from BBPress 2.0 in a section on my homepage?


  • rossagrant
    Participant

    @rossagrant

    Hi guys!

    I really can’t wait to start working with BP 1.5 and BB Press 2.0!

    I’m just going through a homepage redesign in preparation for upgrading.

    I was wondering, if I wanted to give users a sneak peak at what was going on in the site forums, could I somehow add say the latest 5 topics to the homepage in the same kind of layout that you would see in the forum directory?

    Is there a shortcode for adding anything like that to a page?

    Would be awesome if possible!

    Thanks! :)

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

  • Gautam Gupta
    Moderator

    @gautamgupta

    You can use this code (untested, but should work if bbPress is being loaded on that page):

    if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 5 ) ) )
    bbp_get_template_part( 'bbpress/loop', 'topics' );

    @JJJ: I think we could allow such attributes in [bbp-topic-index] shortcode too?


    rossagrant
    Participant

    @rossagrant

    Ahh wow, cool, that looks great! I don’t have BB Press installed on my live site yet but will set up a test and have a look.

    It would be awesome to place shortcodes on pages for stuff like this. Where you could perhaps show x number of latest topics etc.

    Is there any news on an exporter by the way, to export old Buddypress groups/ forums into the new BB Press plugin.

    I want to get rid of groups and just have some forums like on test-bp.org.

    The group names would effectively become the main forum names and then the topics would appear in each forum.

    Is that on the cards?

    Thanks again! :)


    Gautam Gupta
    Moderator

    @gautamgupta

    There is an importer that is bundled with bbPress plugin itself. Just navigate to Tools -> Importer -> bbPress Standalone and enter the path to the BuddyPress bbPress install (should get detected automatically) and you’d be good to go (backup must). :)


    rossagrant
    Participant

    @rossagrant

    Jeez, I didn’t know that was ready! That sounds awesome! So does the importer use the old ‘group’ names as forums or just import all of the posts in one forum?

    Sorry to ask so many questions, I’m totally new to the standalone version.

    :)


    Gautam Gupta
    Moderator

    @gautamgupta

    Yes, if I remember correctly, groups are created as forums internally in bbPress and are sub-ordinate or children of a parent forum created by BuddyPress. When you’re done with your import, you can easily move out all of the forums from that parent and do a recount. Sorry for the late reply. :)

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

You must be logged in to reply to this topic.