Skip to:
Content
Pages
Categories
Search
Top
Bottom

How To Show The Last 10 Forum Posts?

  • Avatar of bpinspire
    bpinspire
    Participant

    @bpinspire

    I try to find a way to show the last 10 forum posts on my new homepage.php page. Few month back Andy was recommended to use this code below for 1.1 version:

    <?php if ( bp_has_activities(

    ‘per_page=10&

    max=10&

    object=groups&

    action=new_forum_topic,new_forum_post’

    ) ) : ?>

    <ul id=”activity-list” class=”forum-posts”>

    <?php while ( bp_activities() ) : bp_the_activity(); ?>

    <li class=”<?php bp_activity_css_class() ?>”>

    <?php bp_activity_content() ?>

    <?php endwhile; ?>

    <?php else: ?>

    <div id=”message” class=”info”>

    <p>No latest forum posts.</p>

    </div>

    <?php endif;?>

    Any idea on 1.2?

You must be logged in to reply to this topic.