[Resolved] Disabling "back to top" button on a specific page?

Home Forums Support [Resolved] Disabling "back to top" button on a specific page?

Home Forums Support Disabling "back to top" button on a specific page?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1230804
    Benjamin

    Hi,

    Is it possible to disable the “back to top” button on a specific page?

    Thanks

    #1230978
    David
    Staff
    Customer Support

    Hi there,

    You can use the filter provided here:

    https://docs.generatepress.com/article/option_generate_settings/

    For example this would disable it on the page whose slug is about-me:

    add_filter( 'option_generate_settings','lh_single_posts_settings' );
    function lh_single_posts_settings( $options ) {
        if ( is_page('about-me') ) {
            $options['back_to_top'] = '';
        }
        
        return $options;
    }
    #1232399
    Benjamin

    Thanks 🙂

    #1232506
    David
    Staff
    Customer Support

    You’re welcome

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