Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: get favorites list

@kevinjohngallagher

Member

Two ways:

1) It’s an array, so just cycle through it and output the bits you want, this will allow you to style it as you please. If you’re unsure of what it returns use: print_r($topics);

2) Alternatively, you could just copy all 3 lines from the Favourites.php file:

$topics = get_user_favorites( $user->ID, true );

$favorites_total = isset($user->favorites) ? count(explode(‘,’, $user->favorites)) : 0;

bb_load_template( ‘favorites.php’, array(‘favorites_total’) );

This will output the favourites in the way you’ve described in your template folder.

==========================================

At the end of the day, BBpress has a number of issues, but if it can already do something, all you really need to do is copy and paste the code :)

Skip to toolbar