Site logo

[Resolved] Sticky menu changing color when scrolling down

Home Forums Support [Resolved] Sticky menu changing color when scrolling down

Home Forums Support Sticky menu changing color when scrolling down

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #451102
    Alexandre

    Hi,

    I would like to replicate the same effect as shown at https://fdcanada.ca/fr/accueil/

    What I’m looking for is a smooth transition from a transparent menu to a colored background when scrolling down. The Home menu (Accueil) is also shifting from green to dark grey when background changes.

    I’m not sure where to begin with. Is this something already cooked in GP or should I add some custom CSS.

    BTW, It’s a real pleasure to work with your theme. So much easier.

    Thanks for your support

    #451134
    Leo
    Staff
    Customer Support

    Hi there,

    Glad you are enjoying GP 🙂

    That header/navigation layout can be achieved with this method here:
    https://docs.generatepress.com/article/navigation-logo/#navigation-as-header

    Then just use CSS to change the sticky navigation color:

    .main-navigation.navigation-stick {
        background-color: #000000;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    #451324
    Alexandre

    Thanks,

    That’s what I was looking for.

    #451494
    Leo
    Staff
    Customer Support

    No problem!

    #488467
    META

    Hi! When I used the page header template the color don’T change when I scroll ????
    http://woocommerce-98152-404440.cloudwaysapps.com/santa-teresa
    Can you tell me why ?

    #489074
    Tom
    Lead Developer
    Lead Developer

    Strange, the necessary classes aren’t being added to the navigation as they should.

    Any changes made to the files by chance?

    #489282
    META

    Yes I’m using a template create by the plugin WP fullpage That I custom to get the genretepress nav.

    <?php
    /**
     * The template for displaying all fullpages
     *
     * This is the template that displays all fullpages by default.
     * Please note that this is the WP Fullpage construct of fullpages and that
     * other 'pages' on your WordPress site will use a different template.
     */
    
    get_header(); ?>
    
    	<div id="primary" <?php generate_content_class();?>>
    		<main id="main" <?php generate_main_class(); ?>>
    			
    
    <div id="fullpage" class="<?php WPFP_Query()->get_fullpage_easing(); ?> <?php print WPFP_Query()->fullpage->post_name; ?>" data-bg="<?php print WPFP_Query()->get_fullpage_bg(); ?>">
    
    	<?php
    
    		while ( have_posts() ) : the_post();
    
    			// Start the sections Loop.
    			WPFP()->get_sections();
    
    		endwhile;
    
    	?>
    
    </div><!-- #fullpage -->
    
    <?php
    
    $navigation = WPFP_Query()->fullpage->fullpage_options['navigation'];
    
    if( 'yes' === $navigation )
    	WPFP()->get_navigation();
    
    // WPFP()->get_sidebar();
    WPFP()->get_footer();

    I’m sure it’s because of that. But I’m out of solution now.

    #489622
    Tom
    Lead Developer
    Lead Developer

    I believe the issue is you’re not calling the wp_footer() function at the bottom of the file.

    Might be worth trying.

    #489679
    META

    It’s all good ! We decide to remove the fullpage option. Everything works fine now!

    #489924
    Leo
    Staff
    Customer Support

    Awesome 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.