Pierre-Luc Auclair (@plauclair)

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • bbp_list_forums needs to be run inside a bbpress loop. Which you call with bbp_has_forums(), which creates a forum object. For example.


    bbp_set_query_name('load_stuff');

    if ( bbp_has_forums(array(
    'post_parent' => 0,
    'post_type' => bbp_get_forum_post_type(),
    'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
    'orderby' => 'menu_order',
    'order' => 'ASC'
    )) ) : ;

    bbp_get_template_part( 'loop', 'forums' );

    else : ;

    bbp_get_template_part( 'feedback', 'no-forums' );

    endif;

    bbp_reset_query_name();


    Pierre-Luc Auclair
    Participant

    @plauclair

    Hi tzeldin88,

    I had a similar problem. I am using various get_post_field calls to display parts of a footer that need to be editable by a client and needed to do apply_filters(‘the_content’,$x).

    I have found that if I call bbp_restore_all_filters('the_content',0);, it will bring the filter back, but it doesn’t affect the rest of the forum. 🙂 I would assume that calling the bbp_remove_all_filters() function after will disable it back.

    Hopefully my example here is clearer.
    http://pastebin.com/BdiMFGTV


    Pierre-Luc Auclair
    Participant

    @plauclair

    After some query, function and class debugging, I now realize that bbpress runs on post_types and a heavily modified wp_query calls and a bunch of (largely undocumented) functions and classes. Most of the magic happens in a Loop that is different depending on what you want to show.

    Looking at the widgets calls has been tremendously helpful in successfully achieving what I wanted to do.

    I managed to find a function/class list with comments at http://phpdoc.ftwr.co.uk/bbpress-plugin/ that was also very helpful.

    I leave this for reference to others, hope it can help someone else.

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