Changing Menu Location

Community Forums Forums Design Tips and Tricks Changing Menu Location

This topic is: not resolved

This topic contains 5 replies, has 3 voices, and was last updated by  jeanboucher 1 year, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #19955

    cwalsh
    Participant
    Post count: 91

    First off, I want to say, I love the new Modern Portfolio Child theme, it is absolutely what I needed for a new site design…just on time.

    I am having a small problem though. I would like the navigation to appear below the header. I am able to get it to appear above the header, which is where it is now just so I can figure this out, but when I try to move it below the header it completely disappears.

    This is my code to add it above;

    /** Reposition the primary navigation */
    add_action( ‘genesis_before_header’, ‘genesis_do_nav’ );

    If I change it to this, it doesn’t work.

    Here is a link to the site http://sharpweddingphotography.ca/wp/

    /** Reposition the primary navigation */
    add_action( ‘genesis_after_header’, ‘genesis_do_nav’ );

    I am obviously missing something but I’m not sure what, any insight and/or help would be awesome.

    Thanks

    Caley

     


    Need website customization services or other help? Caley @ PixelPerfect Design Studio | Connect with me on Twitter: @pixelsperfect | Like me on Facebook: https://www.facebook.com/PixelPerfectDesignStudio

    #19959

    cwalsh
    Participant
    Post count: 91

    Note to add, this is only a problem on the home page, so it must have a problem with my home page template.

     

    <?php
    /**
    * Controls the homepage output.
    */

    add_action( ‘wp_enqueue_scripts’, ‘mp_enqueue_scripts’ );
    /**
    * Enqueue Scripts
    */
    function mp_enqueue_scripts() {

    if ( is_active_sidebar( ‘about’ ) || is_active_sidebar( ‘portfolio’ ) || is_active_sidebar( ‘blog’ ) ) {
    wp_enqueue_script( ‘scroll’, get_stylesheet_directory_uri() . ‘/js/scroll.js’, array(‘jquery’), ”, true );
    }
    }

    add_action( ‘genesis_meta’, ‘mp_home_genesis_meta’ );
    /**
    * Add widget support for homepage. If no widgets active, display the default loop.
    *
    */
    function mp_home_genesis_meta() {

    if ( is_active_sidebar( ‘about’ ) || is_active_sidebar( ‘portfolio’ ) || is_active_sidebar( ‘services’ ) || is_active_sidebar( ‘blog’ ) ) {

    // Force content-sidebar layout setting
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );

    // Add mp-home body class
    add_filter( ‘body_class’, ‘mp_body_class’ );
    function mp_body_class( $classes ) {
    $classes[] = ‘mp-home’;
    return $classes;
    }

    // Remove the navigation menus
    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
    remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );

    // Remove the default Genesis loop
    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );

    // Add homepage widgets
    add_action( ‘genesis_loop’, ‘mp_homepage_widgets’ );

    }

    }

    function mp_homepage_widgets() {

    genesis_widget_area( ‘about’, array(
    ‘before’ => ‘<div id=”about”><div class=”wrap”>’,
    ‘after’ => ‘</div></div>’,
    ) );

    genesis_widget_area( ‘portfolio’, array(
    ‘before’ => ‘<div id=”portfolio”><div class=”wrap”>’,
    ‘after’ => ‘</div></div>’,
    ) );

    genesis_widget_area( ‘services’, array(
    ‘before’ => ‘<div id=”services”><div class=”wrap”>’,
    ‘after’ => ‘</div></div>’,
    ) );

    genesis_widget_area( ‘blog’, array(
    ‘before’ => ‘<div id=”blog”><div class=”wrap”>’,
    ‘after’ => ‘</div></div>’,
    ) );

    }

    genesis();


    Need website customization services or other help? Caley @ PixelPerfect Design Studio | Connect with me on Twitter: @pixelsperfect | Like me on Facebook: https://www.facebook.com/PixelPerfectDesignStudio

    #20130

    bandj
    Participant
    Post count: 188

    // Remove the navigation menus
    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
    remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );

     

    there are no menus to reposition on the home page. Try removing one of these actions.


    #20144

    cwalsh
    Participant
    Post count: 91

    Hi bandj,

    I apologize, I was making some changes and you probably saw it after I had removed the navigation from the home page. The navigation shows up on all my inside pages just fine http://sharpweddingphotography.ca/wp/about-page/ but I can’t get it to show up on my home page.

    Caley


    Need website customization services or other help? Caley @ PixelPerfect Design Studio | Connect with me on Twitter: @pixelsperfect | Like me on Facebook: https://www.facebook.com/PixelPerfectDesignStudio

    #20334

    bandj
    Participant
    Post count: 188

    That code is in the home.php file that I have for that theme. It’s also in the code you posted. Did you already delete or comment it out in your home.php?


    #23361

    jeanboucher
    Participant
    Post count: 4

    Comment your home.php file like this:

    // Remove the navigation menus
    //remove_action( 'genesis_after_header', 'genesis_do_nav' );
    //remove_action( 'genesis_after_header', 'genesis_do_subnav' );

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.