Tagged: bbpress, forum, logged-out, private
HI
I am setting up a forum with bbpress and want it hidden in the menu for logged-out users.
The forums themselves are only visble to logged in members, and I set the main forum page
to private but I am still seeing it in the menu under LOGIN > FORUM.
How can I hide this?
Also – the forum pages themselves don’t have a title or heading at the top – how can I show the name of the forum at the top?
ethanks
Nancy
Hey Munford,
Thank you for the inquiry.
You can use a plugin to control the visibility of the menu items based on certain conditions. Please check the link below:
// https://wordpress.org/plugins/if-menu/
Basic set of visibility rules
– User state User is logged in
– User roles Admin Editor Author etc
– Page type Front page Single page Single post
– Is Archive page (year, category, search results, etc)
– Visitor device Is Mobile
Best regards,
Ismael
ok I will try that plugin.
Is there a solution to getting the forum name on the bbpress forum pages?
thanks for your help
Nancy
Hi,
Thank you for the update.
Try to add this hook in the functions.php file to display the title before the forum content:
add_action('bbp_template_before_single_forum', 'ava_display_forum_title');
function ava_display_forum_title() {
if (bbp_is_single_forum()) {
echo '<h2 class="av-forum-title">' . bbp_get_forum_title() . '</h2>';
}
}
Best regards,
Ismael