Skip to:
Content
Pages
Categories
Search
Top
Bottom

Calling a forum id

  • I’ve insert this to the loop. (showing on the homepage)

    <?php if ( bbp_has_forums( array( 'posts_per_page' => 1, 'max_num_pages' => 1 ) ) ) : ?>

    <?php bbp_get_template_part( 'bbpress/loop', 'forums-1' ); ?>

    <?php else : ?>

    This print only the first forum ID (top forum) and hides all others.

    Next i would like to make this.

    <?php if ( bbp_has_forums( array( 'posts_per_page' => 1, 'max_num_pages' => 1 ) ) ) : ?>

    <?php bbp_get_template_part( 'bbpress/loop', 'forums-1' ); ?>

    <?php else : ?>

    <?php if ( bbp_has_forums( array( ‘posts_per_page’ => 1, ‘max_num_pages’ => 1 ) ) ) : ?>

    <?php bbp_get_template_part( ‘bbpress/loop’, ‘forums-2’ ); ?>

    <?php else : ?>

    <?php if ( bbp_has_forums( array( ‘posts_per_page’ => 1, ‘max_num_pages’ => 1 ) ) ) : ?>

    <?php bbp_get_template_part( ‘bbpress/loop’, ‘forums-3’ ); ?>

    <?php else : ?>

    Only problem it will always call the first (top) forum ID.

    I need to find an $args? for calling a forum ID in each loop, this way i can say get forum ID 4 on the first loop and get forum ID 12 on the second loop.

  • You must be logged in to reply to this topic.
Skip to toolbar