Remove Secondary Nav from Homepage

Homepage Community Forums Epik Theme Support Remove Secondary Nav from Homepage

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16757
    kstrath
    Customer

      Hiya!

      I’m trying to remove the Secondary Nav from the homepage only, and running into a dead end.
      I had previously swapped the primary and secondary positions so I could customize location better through site:
      http://58a.20b.mwp.accessdomain.com/

      Here’s the section of code, that I *think* should be working:
      // Before Header Wrap
      add_action( ‘genesis_before_header’, ‘before_header_wrap’ );
      function before_header_wrap() {
      echo ‘<div class=”head-wrap”>’;
      }

      // Reposition the Primary Navigation
      remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ ) ;
      add_action( ‘genesis_before_header’, ‘genesis_do_nav’ );

      // Reposition the Secondary Navigation
      remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ ) ;
      add_action( ‘genesis_after_header’, ‘genesis_do_subnav’, 12 );

      add_action( ‘get_header’, ‘remove_genesis_do_subnav’ );
      function remove_genesis_do_subnav() {
      if ( is_home() ) {
      remove_action(‘genesis_after_header’, ‘genesis_do_subnav’);
      }
      }

      // After Header Wrap
      add_action( ‘genesis_after_header’, ‘after_header_wrap’ );
      function after_header_wrap() {
      echo ‘</div>’;
      }

      Any ideas?
      Thanks much,
      Kate

      #16758
      Andykev
      Customer

        Since WordPress 2.1, when the static front page functionality was introduced, the blog posts index and site front page have been treated as two different query contexts, with is_home() applying to the blog posts index, and is_front_page() applying to the site front page.

        try if (is_front-page()

        ??

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.