Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to get a list of forums


  • aberglas
    Participant

    @aberglas

    I just want a simple list. I tried
    $forums = get_posts( array( ‘post_type’ => bbp_get_forum_post_type(), ‘numberposts’ => 99 ) );
    But that does not return private posts. (Digging into get_posts is a huge maze of code.)

    I was hoping just to use the Admin All Forums code as a guide, but I cannot find it! What in BB Press generates that form?

    Thanks,

    Anthony

Viewing 2 replies - 1 through 2 (of 2 total)
  • See this thread for some tips

    Display list of topics under specific forum


    aberglas
    Participant

    @aberglas

    Thanks, but I’m not sure how that helps. (I prefer to avoid direct db queries, but it is obvious how to make them.)

    I did discover get_pages, which seems to be similar to get_posts but with a completely different implementation. The following now works.
    return get_pages( array( ‘post_type’ => bbp_get_forum_post_type(), ‘numberposts’ => 99,
    ‘post_status’ => array(‘publish’, ‘private’)) );

    I would still like an answer to the other part of my question, if anyone knows. Ie where is the output generated for things like Admin All Forums in bbpress. These provide good places to look for API examples.

    But silence is better than noise.

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