• At the top of the site pages (the “About Us” for example) the white title area stays on top of the background–how do I get it from staying static while the background of the page with the text scrolls underneath it?

    https://www.g4archery.com/?page_id=71

    I just want a regular page to scroll up and down…

    Thanks for your help!

Viewing 1 replies (of 1 total)
  • Hello!

    There’s a bit of javascript that’s making your menu “stick” to the top when you scroll. If you remove lines 1–22 in themes/a1/js/default.js it should remove that functionality.

    <i>However</i>, the next time your theme has an update that javascript will return to the way it was. So to future proof this change you will need to create a child theme, put the updated javascript file in the child theme and load it instead.

    • Assuming your theme folder is called “a1”, Create a directory for your child theme in your themes folder called ‘a1-child’
    • Copy default.js from the parent theme and put it in a new ‘js’ directory in the child theme. Remove lines 1–22.
    • Create a functions.php file in the child theme with the below code. This will keep the original javascript file from loading and instead load the one you’ve modified.
    <?php
      function child_scripts() {
        wp_deregister_script('a1-default' );
        wp_enqueue_script('a1-default', get_stylesheet_directory_uri() . '/js/default.js', array('jquery'));
        wp_enqueue_style( 'theme_enqueue_styles', get_template_directory_uri() . '/style.css' );
      }
      add_action( 'wp_enqueue_scripts', 'child_scripts', 100 );
    ?>
    • Create a style.css file in your child theme with the below code (child themes require a style.css file with header info).
    /*
     Theme Name:   A1 Child
     Theme URI:    https://fasterthemes.com/wordpress-themes/a1
     Description:  A1 Child Theme
     Author:       Faster Themes
     Author URI:   https://fasterthemes.com
     Template:     a1
     Version:      1.0
     Tags:
     Text Domain:  a1-child
    */

    Hope that helps! ??

Viewing 1 replies (of 1 total)
  • The topic ‘Make Theme navigation header scroll with page instead of static…’ is closed to new replies.