If youโre using Astraโs search option on a website and want to change the default string โSearch Results For,โ youโre in luck! This article will guide you through the process.

To modify the above string, add the following code to your child themeโs functions.php file.
add_filter( 'astra_the_search_page_title', 'my_function', 10 );
function my_function() {
return sprintf( __( 'Add Custom Text Here: %s', 'astra' ), '<span>' . get_search_query() . '</span>' );
}
Hereโs how you can do it:
Navigate to Appearance > Theme File Editor, and access the functions.php file.

Paste the above code here and click on the Update File button.

Verify these changes on your website.

Thatโs it! The text inside โreturn sprintf( __( โAdd Custom Text Here: %sโ, โastraโ )โ in the code can be replaced according to your preferred text.
If you face any issues with the above, please reach out to our support team.