• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Sticky primary menu after header for Wellness Pro theme

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Sticky primary menu after header for Wellness Pro theme

This topic is: not resolved
  • This topic has 2 replies, 2 voices, and was last updated 5 years, 8 months ago by vissersj.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • October 25, 2016 at 2:56 am #195282
    vissersj
    Participant

    Hello,

    I am using the Wellness Pro theme and have implemented the Studiopress solution for sticky menu (http://my.studiopress.com/tutorials/sticky-menu/). Unfortunately the primary navigation is now visible on top over the header instead of under the header (and if you scroll down on top). Please see http://kringloop2switch.nl/ . I have made the following adjustments:

    Commented out the reposition code:

    //* Reposition the primary navigation menu
    //remove_action( 'genesis_after_header', 'genesis_do_nav' );
    //add_action( 'genesis_before', 'genesis_do_nav' );

    Commented out the js code, so the primary menu is visible all the time:

    jQuery(function( $ ){
    $(window).scroll(function() {
    var yPos = ( $(window).scrollTop() );
    /*if(yPos > 200) { // show sticky menu after screen has scrolled down 200px from the top
    $(".nav-primary").fadeIn();
    } else {
    $(".nav-primary").fadeOut();
    }*/
    });
    });

    Added a little css, but if I comment out 'position' or 'top', the primary menu is under the header but not sticky or sticky in the middle of the screen.

    .nav-primary {
    background-color: #fff;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    /*display: none;*/
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    }

    http://kringloop2switch.nl/
    October 25, 2016 at 12:21 pm #195317
    William
    Member

    I think one of the following 2 options will get you going:

    http://stackoverflow.com/questions/1216114/how-can-i-make-a-div-stick-to-the-top-of-the-screen-once-its-been-scrolled-to

    Scroll-Then-Fix Content

    🙂


    Genesis Customization Service | Quick fixes whenever you need them ! | Contact me at Fixmysite.com !

    October 26, 2016 at 4:56 am #195334
    vissersj
    Participant

    Thank you, but this solution worked better for me: http://www.simpleprothemes.com/sticky-navigation-menu-flex-pro-theme/

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble