Skip to:

'bbPress Topics list' widget, outside loop

  • venividi


    I want to use ‘bbPress Topics list’ widget, outside widget.

    I’d very happy that someone let me know the code to use it outside widget.

    Thank you in advance.

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

  • Anointed


    I don’t understand the question



    //anointed, I must say sorry if I bothered you.

    You might see the ‘bbPress Topics list’ widget, in wordpress widgets. I meant I want to use the widget ‘outside the loop’.

    That must be done the code like below:


    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’, ‘title’ );




    NO, not bothered at all, was just saying that I didn’t understand what you were asking is all.

    If I understand you basically want to take the code from the topics widget and use it as a standalone loop instead of a widget?

    Keep in mind I’m not a great coder: If it were me, I would simply copy the code from the bbp-core-widget.php file that I needed for the topics widget. I would then strip out the widget portion of the code and hard code in the default arguments.

    This basically would give me the same loop used by the widget.

    // Query defaults
    $topics_query = array(
    'author' => 0,
    'post_parent' => any,
    'posts_per_page' => 10,
    'show_stickies' => false,
    'order' => 'DESC',

    Probably better ways out there, but that’s how I would try it

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar