Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbp_list_forums does not show anything

  • In my bbpress sidebar, bbp_list_forums() function does not echo anything. What is the trouble? wp_tag_cloud() works fine few rows below. Pls help

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

  • Lynq
    Participant

    @lynq

    bbp_list_forums will list the sub forums of a parent forum.

    Hope that makes sense?

    Thanks a lot! I put bbp_list_forums to sidebar to show all forums like here. So what is the right way to do that? It would be nice if i could download template files for the theme used here. At least for the sidebar. 🙂


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Here on bbPress.org, I used the forums shortcode, and used CSS to hide a few columns. I did not use bbp_list_forums(), which has a specific purpose outside of what you’re trying to do.


    dyspersion media
    Participant

    @dyspersion

    For anyone else who comes here trying to programmatically display the forum index list, you can call shortcodes like this:


    echo( bbpress()->shortcodes->display_forum_index() );

    For what it’s worth, I don’t know why a function called “list_forums” would display *sub* forums. I would think that would be a function named “list_sub_forums” but, oh well. At least there’s a work around. It’s also worth noting that this might not be the best way to do this. I haven’t done much testing (I’ve done none).

    Cheers!


    Shane Gowland
    Participant

    @thewebatom

    An even easier way to call shortcodes is with the do_shortcode() method.

    You can programmatically call the bbp-forum-index shortcode like this:

    <?php echo do_shortcode(‘[bbp-forum-index]‘) ?>


    marcello.vicidomini
    Participant

    @marcellovicidomini

    I think I figured out a cleaner way: I just wanted a list of links to the forums, not the whole loop with all the columns, so I searched for the code of the Forums list plugin in bbpress.php and used its name in the the_widget() function, like this:

    the_widget('BBP_Forums_Widget');

    It’s working well for me.

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