How to Change the Destination URL for Website Logo?

By default, clicking on the website logo directs the user to the front/home page. In case, you need to change the destination for the logo use following custom code.

Note: Paste the code to the child theme’s functions.php file.

add_action('astra_masthead', 'astra_logo_change_url');

function astra_logo_change_url(){
remove_action( 'astra_masthead_content', 'astra_site_branding_markup', 8 );
add_filter( 'home_url', 'astra_logo_custom_url' );
add_action( 'astra_masthead_content', 'astra_site_branding_markup', 8 );

function astra_logo_custom_url( $url ) {
return '';
function astra_remove_logo_custom_url(){
remove_filter( 'home_url', 'astra_logo_custom_url' );

Make sure you replace the test URL ( with your destination URL in the above code.

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