Dropdown menu with all forums – How to ?
I’m trying to display a dropdown menu with all the forums on all templates of bbPress. I was able to easily to it on the “content-archive-forum.php” template with this code :
<?php if ( bbp_has_forums() ) : ?> <?php while ( bbp_forums() ) : bbp_the_forum(); ?> <li><a id="textdropdown" class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a></li> <?php endwhile; ?> <?php else : ?> <?php bbp_get_template_part( 'feedback', 'no-forums' ); ?> <?php endif; ?>
The problem i’m having is on all other pages. I know that it’s passing the wrong forum_id to the bbp_has_forums function but i’m unable to modify the parameters or make a custom function to display a list (with links) of the MAIN forums (the one displayed on the “content-archive-forum.php”).
Basically, it displays the message “Oh bother! No forums were found here!” on all other pages.
Can anyone help me or tell me how to do this ?
Thanks in advance!
- You must be logged in to reply to this topic.