Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Shaped Pixels

    (@shaped-pixels)

    This is a bit involved, but you will definitely need to switch to using a child theme for this because you have to do what is called “de-register” the parent theme javascript enqueue (what grabs and loads a script file) script for this function and then re-register a new one from the child theme.

    If you plan on doing this, you need to make a new javascript file in your child theme’s js folder (you need to create this folder if not already there).

    In your child theme’s functions.php file, you need to add this:

    // enqueue is removed from parent and we then load our child theme one.
    add_action('wp_enqueue_scripts', 'my_custom_script_file', 100);
    function my_custom_script_file() {
        wp_dequeue_script('senses-navigation');
        wp_enqueue_script('child_theme_my_script', get_stylesheet_directory_uri().'/js/functions.js', array( 'jquery' ), '20120206', true );
    }

    IMPORTANT: I have not tried this, so I cannot guarantee this will work, but based on what I’ve seen on Google Search that I found where someone wanted to do something similar. There’s another similar method from another post at WordPress that might help.

    Then….you can copy the parent theme’s functions.js file and create a new one in the child theme’s js folder. Open the file in a text editor and modify the “800” to be less, or whatever your preference is.

    Best thing is if you are using a child theme, you can delete the file and code you do if you run into problems and try again.

    Thread Starter daddybo

    (@daddybo)

    Thank you. I am going to work on this in the coming few days.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Back To Top Button’ is closed to new replies.