back to top button

  • Is it possible to deactivate the back to top button? The theme I use already have one by default and I would like to keep things this way. Thank you!

  • Hello @phil59

    Add the following code in your theme's functions.php or a site specific plugin (if you have one).

    add_action( 'wp_head', 'remove_my_class_action' );
    function remove_my_class_action(){
    	global $jQuerySmoothScroll;
    	remove_action( 'wp_footer', array( $jQuerySmoothScroll, 'wp_footer_lol' ) );

  • Hi there!
    I have tried to use this code to also remove the back to top scroll button, however this code does not work for me.
    css says there are more than 20 erros with unexpected tokens, expexted LBRACE and expected LBRACE etc.
    I do not know any code art all so can you check if this still works at all?

  • Update! Removing the ' signs around the 'wp_head' so it just looks like wp_head makes the errors go down to 2. The last error messages I get are the following:

    Unexpected token 'add_action(' at line 5 col.1
    Unexpected token 'remove_my_class_action''

    How does this get fixed? Thanks 🙂

Log in to reply