• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Can't get the Navigation to work above header

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Can't get the Navigation to work above header

This topic is: resolved

Tagged: moving navigation menus

  • This topic has 3 replies, 2 voices, and was last updated 12 years, 9 months ago by Doug.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 18, 2013 at 5:17 pm #36241
    Doug
    Member

    Hello, I can't get the sub-navigation to work (you can't see the sub-nav pages) above the header; I've put in the code like Nick told me; but, it's still not working:

    http://prowsefarm.org/blog/

    <code>/** Reposition the primary navigation */
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_before', 'genesis_do_nav' );</code>

    I can't get the child pages to show under the parent pages. Can anyone help?

    Here's the code in its entirety:

    <code><?php
    /** Start the engine */
    require_once( get_template_directory() . '/lib/init.php' );

    /** Child theme (do not remove) */
    define( 'CHILD_THEME_NAME', 'Magazine Theme' );
    define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/magazine' );

    /** Add Viewport meta tag for mobile browsers */
    add_action( 'genesis_meta', 'magazine_add_viewport_meta_tag' );
    function magazine_add_viewport_meta_tag() {
    echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
    }

    /** Create additional color style options */
    add_theme_support( 'genesis-style-selector', array(
    'magazine-blue'        => 'Blue',
    'magazine-green'    => 'Green',
    'magazine-orange'    => 'Orange',
    'magazine-purple'    => 'Purple',
    'magazine-red'        => 'Red',
    'magazine-teal'        => 'Teal'
    ) );

    $content_width = apply_filters( 'content_width', 610, 460, 910 );

    /** Add support for structural wraps */
    add_theme_support( 'genesis-structural-wraps', array(
    'header',
    'nav',
    'subnav',
    'inner',
    'footer-widgets',
    'footer'
    ) );
    add_theme_support( 'genesis-connect-woocommerce' );

    /** Add new image sizes */
    add_image_size( 'home-bottom', 280, 150, TRUE );
    add_image_size( 'slider', 600, 250, TRUE );
    add_image_size( 'square', 120, 120, TRUE );
    add_image_size( 'tabs', 580, 250, TRUE );

    /** Add support for custom header */
    add_theme_support( 'genesis-custom-header', array(
    'width' => 960,
    'height' => 200
    ) );

    /** Add support for custom background */
    add_theme_support( 'custom-background' );

    /** Reposition the primary navigation */
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_before', 'genesis_do_nav' );

    /** Add after post ad section */
    add_action( 'genesis_after_post_content', 'magazine_after_post_ad', 9 );
    function magazine_after_post_ad() {
    if ( is_single() && is_active_sidebar( 'after-post-ad' ) ) {
    echo '<div class="after-post-ad">';
    dynamic_sidebar( 'after-post-ad' );
    echo '</div><!-- end .after-post-ad -->';
    }
    }

    /** Add after content ad section */
    add_action( 'genesis_before_footer', 'magazine_after_content_ad' );
    function magazine_after_content_ad() {
    if ( is_active_sidebar( 'after-content-ad' ) ) {
    echo '<div class="after-content-ad">';
    dynamic_sidebar( 'after-content-ad' );
    echo '</div><!-- end .after-content-ad -->';
    }
    }

    /** Add support for 3-column footer widgets */
    add_theme_support( 'genesis-footer-widgets', 3 );

    /** Register widget areas */
    genesis_register_sidebar( array(
    'id'                => 'home-top',
    'name'            => __( 'Home Top', 'magazine' ),
    'description'    => __( 'This is the home top section.', 'magazine' ),
    ) );
    genesis_register_sidebar( array(
    'id'                => 'home-left',
    'name'            => __( 'Home Left', 'magazine' ),
    'description'    => __( 'This is the home left section.', 'magazine' ),
    ) );
    genesis_register_sidebar( array(
    'id'                => 'home-right',
    'name'            => __( 'Home Right', 'magazine' ),
    'description'    => __( 'This is the home right section.', 'magazine' ),
    ) );
    genesis_register_sidebar( array(
    'id'                => 'home-bottom',
    'name'            => __( 'Home Bottom', 'magazine' ),
    'description'    => __( 'This is the home bottom section.', 'magazine' ),
    ) );
    genesis_register_sidebar( array(
    'id'                => 'after-post-ad',
    'name'            => __( 'After Post Ad', 'magazine' ),
    'description'    => __( 'This is the after post ad section.', 'magazine' ),
    ) );
    genesis_register_sidebar( array(
    'id'                => 'after-content-ad',
    'name'            => __( 'After Content Ad', 'magazine' ),
    'description'    => __( 'This is the after content ad section.', 'magazine' ),
    ) );</code>

    Thanks, Doug

    http://prowsefarm.org/blog/
    April 18, 2013 at 8:13 pm #36271
    Dorian Speed
    Member

    Which menu are you trying to reposition - the primary, or the secondary? The code you're using will move the primary menu above the header, which is what I see when I look at your site. To move the secondary menu, I believe you should use:

    /** Reposition the secondary navigation menu */
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    add_action( 'genesis_before_header', 'genesis_do_subnav' );
    

    Bringing websites Up to Speed
    Firebug will light the way to understanding the secrets of the Internet!

    April 19, 2013 at 8:25 am #36358
    Doug
    Member

    Dorian, thank you; I will take a look and get right back to you.

    Doug

    April 19, 2013 at 8:34 am #36360
    Doug
    Member

    Dorian,

    It worked! Thank you, thank you, thank you; you are a good and helpful person. 🙂

    Namasté,

    Doug

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble