Community Forums › Forums › Archived Forums › Design Tips and Tricks › Modern Portfolio Header Right Menu Only on Homepage
Tagged: menu, modern portfolio, navigation menu
- This topic has 7 replies, 3 voices, and was last updated 9 years, 6 months ago by eluviis.
-
AuthorPosts
-
March 25, 2015 at 10:07 pm #145702eluviisMember
The anchor jump-style on the main menu on Modern Portfolio is pretty cool, but I feel it shouldn't be anywhere else but the homepage. On all other pages, the only menu should be that the Primary WordPress Navigation menu.
How do I do it so that the jump-style menu ONLY shows on the homepage and the Primary WordPress Navigation menu shows everywhere BUT the homepage?
Thanks
March 25, 2015 at 11:42 pm #145706eluviisMemberOk, so poking about I discovered the Home-Right widget code is on "front-page.php" and it looks like this:
add_action( 'wp_enqueue_scripts', 'mpp_enqueue_scripts' ); /** * Enqueue Scripts */ function mpp_enqueue_scripts() { if ( is_active_sidebar( 'home-about' ) || is_active_sidebar( 'home-portfolio' ) || is_active_sidebar( 'home-services' ) || is_active_sidebar( 'home-blog' ) ) { wp_enqueue_script( 'scrollTo', get_stylesheet_directory_uri() . '/js/jquery.scrollTo.min.js', array( 'jquery' ), '1.4.5-beta', true ); wp_enqueue_script( 'localScroll', get_stylesheet_directory_uri() . '/js/jquery.localScroll.min.js', array( 'scrollTo' ), '1.2.8b', true ); wp_enqueue_script( 'scroll', get_stylesheet_directory_uri() . '/js/scroll.js', array( 'localScroll' ), '', true ); } } add_action( 'genesis_meta', 'mpp_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function mpp_home_genesis_meta() { if ( is_active_sidebar( 'home-about' ) || is_active_sidebar( 'home-portfolio' ) || is_active_sidebar( 'home-services' ) || is_active_sidebar( 'home-blog' ) ) { // Force content-sidebar layout setting add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); // Add mpp-home body class add_filter( 'body_class', 'mpp_body_class' ); // Remove the navigation menus remove_action( 'genesis_after_header', 'genesis_do_nav' ); remove_action( 'genesis_after_header', 'genesis_do_subnav' ); // Remove breadcrumbs remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); // Remove the default Genesis loop remove_action( 'genesis_loop', 'genesis_do_loop' ); // Add homepage widgets add_action( 'genesis_loop', 'mpp_homepage_widgets' ); } }
Now, hmmm..... How do I make it so that it only show on the homepage and not anywhere else?
April 2, 2015 at 11:13 am #146470eluviisMemberAnybody?
April 3, 2015 at 6:18 pm #146608ᴅᴀᴠɪᴅMemberThe simplest way is with this plugin. You can create one menu for the home page, then a second menu to appear on every other page.
I love helping creative entrepreneurs build epic things with WP & Genesis.
April 7, 2015 at 9:30 pm #147009eluviisMemberUnfortunately, the plugin doesn't seem to do what it's supposed to on Modern Portfolio Pro.
This theme is tricky. That jump menu is cool, but there really is not really for it to be showing on any other page but the homepage. That's all I want to do and I can't seem to figure out how.
April 7, 2015 at 9:35 pm #147011eluviisMemberBy the way... this is the site: http://andrewsaintandrew.com - I just want the header right menu (header right widget) to ONLY show on the homepage. That's all.
April 7, 2015 at 11:52 pm #147020Genesis DeveloperMemberYou can try this . If you are not using JetPack plugin then you can use Widget Logic Plugin.
May 16, 2015 at 10:38 pm #152465eluviisMemberI ended up using the plugin - Easy Custom Sidebars and that did the trick. I was able to replace the header-right sidebar in every page but the homepage.
Cheers
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.