Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

i want to make a custom template using Genesis.. I added a custom Menu just by adding a widget on WIDGETS section and placed it on the top right side of the page. But i want it to be removed in a specific template ... How can i do that??

<?php
/*
Template Name:  No Menu - Full Page
*/
?>
<?php get_header(); ?>
<?php if ( has_post_thumbnail() ) { ?>

<div id="featured">
  <?php the_post_thumbnail(); ?>
</div>
<?php } ?>
<?php genesis_before_content_sidebar_wrap(); ?>
<div id="content-sidebar-wrap">
  <?php genesis_before_content(); ?>
  <div id="content" class="hfeed">
    <?php genesis_before_loop(); ?>
    <?php genesis_loop(); ?>
    <?php genesis_after_loop(); ?>
  </div>
  <!-- end #content -->
  <?php genesis_after_content(); ?>
</div>
<!-- end #content-sidebar-wrap -->
<?php genesis_after_content_sidebar_wrap(); ?>
<?php get_footer(); ?>

I guess i just dont know the code.. but i want this to be removed in my custom template genesis_header_right

using Inspect Element, I copied the HTML version of the whole header

    <div id="header">
      <div class="wrap">
        <div id="title-area">
          <div class="genesis_hook" title="By default, this hook outputs the site title, within the header area. It uses the user-specified SEO settings to build the site title markup appropriately.">genesis_site_title</div>
          <h1 id="title"><a href="http://localhost/mysite/" title="Title">Title</a></h1>
          <div class="genesis_hook" title="By default, this hook outputs the site description, within the header area. It uses the user-specified SEO settings to build the site description markup appropriately.">genesis_site_description</div>
          <p id="description">Just another WordPress site</p>
        </div>
        <!-- end #title-area -->
        <div class="widget-area">
          <div class="genesis_hook" title="This hook executes immediately before the Header Right widget area inside div.widget-area.">genesis_header_right</div>
          <div id="nav_menu-2" class="widget widget_nav_menu">
            <div class="widget-wrap">
              <div class="menu-top-menu-container">
                <ul id="menu-top-menu" class="menu genesis-nav-menu sf-js-enabled">
                  <li id="menu-item-172" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-home menu-item-172"><a href="http://localhost/mysite">Home</a></li>
                </ul>
              </div>
            </div>
          </div>
        </div>
        <!-- end .widget-area --></div>
      <!-- end .wrap --></div>

this is the code i want to remove

            <div class="widget-area">
              <div class="genesis_hook" title="This hook executes immediately before the Header Right widget area inside div.widget-area.">genesis_header_right</div>
              <div id="nav_menu-2" class="widget widget_nav_menu">
                <div class="widget-wrap">
                  <div class="menu-top-menu-container">
                    <ul id="menu-top-menu" class="menu genesis-nav-menu sf-js-enabled">
                      <li id="menu-item-172" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-home menu-item-172"><a href="http://localhost/mysite">Home</a></li>
                    </ul>
                  </div>
                </div>
              </div>
            </div>

I tried adding this below the get header code

unregister_sidebar( 'header-right' );

Didnt do anything

share|improve this question
add comment

2 Answers 2

The menu is most likely part of the file header.php, which is called from get_header(). To alter the header just for your custom template, you may create another header file (e.g. header-no-menu.php), and call it using get_header('no-menu'). Here's a link to some documentation: http://codex.wordpress.org/Function_Reference/get_header Hope that helps!

share|improve this answer
    
Ok ill read that, for now i made an alternative using CSS display: none –  Jeremi Liwanag Aug 25 '13 at 3:44
add comment
<?php if ( ! is_page_template( 'your-specific-template.php' ) { ?>
    <div class="widget-area">
        ⋮
    </div>
<?php } ?>

http://codex.wordpress.org/Function_Reference/is_page_template

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.