WordPress.org

Ready to get started?Download WordPress

Forums

Quark
[resolved] Move menu navigation from header to banner on all pages except homage (4 posts)

  1. daliak
    Member
    Posted 10 months ago #

    Hi,

    I would like to move the menu navigation from header to banner on all pages except for the homepage.

    I've read a couple of posts but so far I've only managed to ruin the whole thing.

    Can you assist please, this for http://grfranchising.com.

    Thanks in advance for your help.

    Dalia

    [ Please do not bump, that's not permitted here. ]

  2. ahortin
    Member
    Theme Author

    Posted 10 months ago #

    The main navigation menu is located in header.php. You'll see a section similar to the following.

    <nav id="site-navigation" class="main-navigation" role="navigation">
       <h3 class="menu-toggle assistive-text"><?php esc_html_e( 'Menu', 'quark' ); ?></h3>
       <div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'quark' ); ?>"><?php esc_html_e( 'Skip to content', 'quark' ); ?></a></div>
       <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    </nav> <!-- /.site-navigation.main-navigation -->

    You'll need to copy this into the div's below this code, where it displays the banner. You'll also need to put some conditional checks around it so that it displays on all pages except for the homepage. As well as putting a conditional check around the original code so that it only displays on the homepage.

  3. daliak
    Member
    Posted 10 months ago #

    ok thanks for this piece already.

    I know nill about php, what is the conditional text i need to put around?

    Thanks again.

    Dalia

  4. ahortin
    Member
    Theme Author

    Posted 10 months ago #

    You can check if you're currently showing the Front page using the following.

    <?php if ( is_front_page() ) {
    }?>

    Or alternatively, if it's NOT the frontpage.

    <?php if ( !is_front_page() ) {
    }?>

    If you're not familiar with PHP, then I would really recommend getting a developer to update your templates rather than attempting it yourself.

Reply

You must log in to post.

About this Theme

About this Topic