Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display categories on all pages


  • ryplittle
    Participant

    @ryplittle

    I am new to bbPress development and have been searching for how to do this for a while now, so I figured I’d ask here.

    I am wanting to display a loop of all of the forum categories on every page of the forum (as a type of navigation). I am able to display it in the forum root, but when it goes into a category, the loop becomes the forums rather than the categories.

    In loop-forums.php, for example, I have the following code:

    <?php do_action( 'bbp_template_before_forums_loop' ); ?>
    <ul id="forum-subhead-nav">
    <?php while ( bbp_forums() ) : bbp_the_forum();
    
    if (bbp_is_forum_category()) { ?>
    
    	<li>
    		<a class="bbp-forum-title button-link" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a>
    	</li>
     <?php } ?>
    <?php endwhile; ?>
    </ul>

    I was wondering if someone can help me out so it loops all of the forum categories, and that doesn’t change depending on the forum.

    Thanks

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