Back to top button functie

<?php add_action( 'wp_footer', 'back_to_top' );

function back_to_top() {

    echo '<a id="totop" href="#">Back to Top</a>';

}

?>