Skip to:

hide Home Menu on bbPress pages

  • stewmills


    I have:
    WP 4.4.2
    bbPress 2.5.8
    BuddyPress 2.4.3
    Karma theme 3.0.3

    Please see my forum home page here:

    What I want to do is hide the “white area” with the logo and menu (products, gallery, etc.) ONLY on bbpress forum pages, not the rest of the non-forum pages. Here is the code for my bbPress.php page created from copying another template page and saving it in my child theme (as instructed).

    Can anyone tell me what to edit/remove from this page to just remove the home menu, but LEAVE the main top menu (home, about us, client sites) in blue?

    I have tried several things and can’t seem to get anywhere.

    Thanks in advance!!!

    Template Name: bbPress
    <?php get_header(); ?>
    </div><!-- header-area -->
    </div><!-- end rays -->
    </div><!-- end header-holder -->
    </div><!-- end header -->
    <?php truethemes_before_main_hook();// action hook, see truethemes_framework/global/hooks.php ?>
    <div id="main">
    <?php get_template_part('theme-template-part-tools','childtheme'); ?>
    <div class="main-holder">
    //retrieve value for sub-nav checkbox
    global $post;
    $post_id = $post->ID;
    $meta_value = get_post_meta($post_id,'truethemes_page_checkbox',true);
    <div id="content" class="content_left_sidebar">
    <?php if(have_posts()) : while(have_posts()) : the_post(); the_content(); truethemes_link_pages(); endwhile; endif;
    comments_template('/page-comments.php', true);
    get_template_part('theme-template-part-inline-editing','childtheme'); ?>
    </div><!-- end content -->
    <div id="sidebar" class="left_sidebar">
    <?php dynamic_sidebar('bbpress-custom-sidebar'); ?>
    </div><!-- end sidebar -->
    </div><!-- end main-holder -->
    </div><!-- main-area -->
    <?php get_footer(); ?>
Viewing 4 replies - 1 through 4 (of 4 total)

  • Robin W



    That’ll be in your header.php, and you’ll need to find the part that says

    <div class="header-area">
    through to

    and wrap it in

    <?php if (!=bbpress()) : ?>
    <div class="header-area">
    through to
    <?php endif; ?>

    so it will display if it is not a bbpress page



    Here is some CSS that could do the same thing. Add the css styles to your child theme style css or insert the code in a plugin that can hold custom css styles.

    .bbpress .header-holder, 
    .page-template-bbpress .header-holder {
      display: none;



    Tried the CSS route and could not get it to work.

    So, in looking at Robin W suggestion I could not locate the exact section to wrap. I could not locate <div class=”header-area”> with a closing of </div>. Here is what I have (starting with the body section of my page code)

    <body <?php body_class(); ?>>
    <?php if ( 'true' == $boxedlayout ) {echo '<div id="tt-boxed-layout">';}else{echo '<div id="tt-wide-layout">';} ?>
    <div id="wrapper" <?php if (is_page_template('template-homepage-3D.php') || is_page_template('template-homepage-jquery-2.php')) {echo 'class="big-banner"';} ?>>
    <div id="header" <?php if (is_page_template('template-homepage-3D.php')){echo "style='height: 560px;'";} ?>>
    // show the toolbar if selected by the user :
    if ($ka_toolbar == "true"): 
    <div class="top-block">
    <div class="top-holder">
      <?php truethemes_before_top_toolbar_menu_hook();// action hook, see truethemes_framework/global/hooks.php ?>
      <?php if(has_nav_menu('Top Toolbar Navigation')): ?>
      <div class="toolbar-left">  
      <?php wp_nav_menu(array('theme_location' => 'Top Toolbar Navigation' , 'depth' => 0 , 'container' =>false )); ?>
      </div><!-- end toolbar-left -->
      //if top toolbar menu not set, we show dynamic sidebar  
      <div class="toolbar-left">  
      <ul><?php dynamic_sidebar("Toolbar - Left Side"); ?></ul>
      </div><!-- end toolbar-left -->
      <?php endif; ?>
      <?php if(is_active_sidebar(2)): ?>
      <div class="toolbar-right">
      <?php dynamic_sidebar("Toolbar - Right Side"); ?>
      </div><!-- end toolbar-right -->
      <?php endif; ?>
    <?php truethemes_after_top_toolbar_menu_hook();// action hook, see truethemes_framework/global/hooks.php ?>
    </div><!-- end top-holder -->
    </div><!-- end top-block -->
    <?php endif; //end if($toolbar == 'true') ?>
    <?php truethemes_before_header_holder_hook();// action hook, see truethemes_framework/global/hooks.php ?>
    <div class="header-holder">
    <div class="rays">
    <div class="header-area<?php if (is_search()) {echo ' search-header';} ?><?php if (is_404()) {echo ' error-header';} ?><?php if (is_page_template('template_sitemap.php')) {echo ' search-header';} ?>">
    <?php // Website Logo
    if ($ka_logo_text == ''){
    <a href="<?php echo home_url(); ?>" class="logo"><img src="<?php echo $ka_sitelogo; ?>" alt="<?php bloginfo('name'); ?>" /></a>
    <?php }else{?>
    <a href="<?php echo home_url(); ?>" class="custom-logo"><img src="<?php echo get_template_directory_uri(); ?>/images/_global/<?php echo $ka_logo_icon; ?>" alt="<?php bloginfo('name'); ?>" /><span class="logo-text"><?php echo $ka_logo_text; echo '</span></a>';}?>
    <?php truethemes_before_primary_navigation_hook();// action hook, see truethemes_framework/global/hooks.php ?>
    <?php if(has_nav_menu('Primary Navigation')): ?>
    <ul id="menu-main-nav">
    <?php wp_nav_menu(array('theme_location' => 'Primary Navigation' , 'depth' => 0 , 'container' =>false , 'walker' => new description_walker() )); ?>
    <?php endif; ?>
    <?php truethemes_after_primary_navigation_hook();// action hook, see truethemes_framework/global/hooks.php ?>

    Robin W


    you need header.php
    not the body part of the code

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