Community Forums › Forums › Archived Forums › Design Tips and Tricks › Changing Menu Location
- This topic has 5 replies, 3 voices, and was last updated 11 years, 6 months ago by jeanboucher.
-
AuthorPosts
-
February 12, 2013 at 5:21 pm #19955cwalshMember
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
February 12, 2013 at 5:28 pm #19959cwalshMemberNote 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
February 13, 2013 at 1:57 pm #20130bandjMember// 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.
February 13, 2013 at 3:04 pm #20144cwalshMemberHi 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
February 14, 2013 at 11:13 am #20334bandjMemberThat 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?
February 28, 2013 at 3:25 pm #23361jeanboucherMemberComment 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' );
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.