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?

Not the solution you are looking for? Check other articles, or open a support ticket.