How to Change the "Scroll To Top" Icon in Astra?

No results found. Try again with different words?

Search must be at least 3 characters.

How to Change the “Scroll To Top” Icon in Astra?

The astra_scroll_top_icon filter allows you to update the Scroll To Top icon class.


// Filter callback function
function example_callback(  ) {
    // Process you code here
    return variable;
add_filter( 'astra_scroll_top_icon', 'example_callback', 10 );


 * Add custom class to Scroll To Top
 * @return string $classes
function astra_scroll_top_icon_callback() {
    $classes = 'fa fa-angle-double-up'; // 'fa fa-angle-double-up' replace with your class
    return $classes;
add_filter( 'astra_scroll_top_icon', 'astra_scroll_top_icon_callback', 10 );

Note: To use ‘fa fa-angle-double-up’ class you need to enqueue Font Awesome to your theme.

Check out the doc that explains how to add custom PHP code using the child theme’s functions.php file. 

Refer – How to Add Font Awesome Icons in Astra?

Was this article helpful?
Did not find a solution? We are here to help you succeed.

Related Docs

Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.