Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to Get Latest Ten Forum Titles


  • bpisimone
    Participant

    @bpisimone

    Is there an easy way to get the latest ten forum titles displayed anywhere like in the footer?

    For the blog posts I use <?php $posts = bp_blogs_get_latest_posts( null, 10 ) ?>

    But what about forum posts?

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

  • danbpfr
    Participant

    @chouf1


    bpisimone
    Participant

    @bpisimone

    Thanks Chouf1. Simpler, without a plugin?


    danbpfr
    Participant

    @chouf1

    Euh…. not using BP ? :-)


    bpisimone
    Participant

    @bpisimone

    What do you mean by that?

    I’m using BuddyPress of course. But I just don’t want to add a plugin for a simple action like that.

    I just want to add the last ten titles from the buddypress/bbpress side in the footer.


    bpisimone
    Participant

    @bpisimone

    I’m still trying to make this happen without a plugin: Now I am pretty certain this can be accomplished by using this

    if ( bp_has_activities( 'type=sitewide&max=6&action=new_forum_topic' ) )

    I still haven’t figured out though how only to filter out the title (plus link).

    <?php if ( bp_has_activities( 'type=sitewide&max=10&action=new_forum_topic' ) ) : ?>

    <ul class="activity-list">

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

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

    <?php bp_activity_content() ?>

    </li>

    <?php endwhile; ?>

    </ul>

    <?php endif;?>

    Maybe by modifying bp_activity_content?

    Thanks people!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to Get Latest Ten Forum Titles’ is closed to new replies.
Skip to toolbar