WordPress.org

Forums

[Theme: Stargazer] How to move secondary menu to below header image. (3 posts)

  1. CharBram
    Member
    Posted 11 months ago #

    How do I edit header.php to move the secondary menu so that it is below my site header graphic?

    site:

    NeoAnalyst.com

  2. Spence "The Evil Genius" Forman
    Member
    Posted 11 months ago #

    Hi Char,

    Change this:

    <?php hybrid_get_menu( 'secondary' ); // Loads the menu/secondary.php template. ?>
    </header><!-- #header -->
    <?php if ( get_header_image() && !display_header_text() ) : // If there's a header image but no header text. ?>
    <a href="<?php echo home_url(); ?>" title="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" rel="home"><img class="header-image" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    <?php elseif ( get_header_image() ) : // If there's a header image. ?>
    <img class="header-image" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
    <?php endif; // End check for header image. ?>
    <div id="main" class="main">

    to this:

    </header><!-- #header -->
    <?php if ( get_header_image() && !display_header_text() ) : // If there's a header image but no header text. ?>
    <a href="<?php echo home_url(); ?>" title="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" rel="home"><img class="header-image" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    <?php elseif ( get_header_image() ) : // If there's a header image. ?>
    <img class="header-image" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
    <?php endif; // End check for header image. ?>
    <?php hybrid_get_menu( 'secondary' ); // Loads the menu/secondary.php template. ?>
    <div id="main" class="main">

    Effectively, moving the secondary menu code to just above the #main div.

    <?php hybrid_get_menu( 'secondary' ); // Loads the menu/secondary.php template. ?>

    All in the header.php of course. Best to do this with a child theme instead of in your parent, to be sure you don't lose anything during an update ;-)
    If you need a little help with child themes, we have a couple videos step by step here:
    http://www.1stwebdesigner.com/wordpress/create-responsive-wordpress-site-child-theme-tutorial/

    Cheers!
    spence

  3. CharBram
    Member
    Posted 11 months ago #

    Spence,

    Thanks for the quick reply! I will mess around with that and see how it goes!

    Instead of creating a child theme, I actually cloned my parent theme by creating a new folder and copying all the information into there.

    Do you see any issues with this?

    Will it potentially update and erase my changes. If so, would simply changing the name of it stop it from updating?

Reply

You must log in to post.

About this Topic