Quantcast
Channel: bbPress.org » All Posts
Viewing all articles
Browse latest Browse all 3638

Dropdown menu with all forums – How to ?

$
0
0

Hello!

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!


Viewing all articles
Browse latest Browse all 3638

Trending Articles