Skip to content

Instantly share code, notes, and snippets.

@rushijagani
Created April 18, 2018 14:06
Show Gist options
  • Save rushijagani/a0c9b3e98bdb1697553d3ab48a4b9212 to your computer and use it in GitHub Desktop.
Save rushijagani/a0c9b3e98bdb1697553d3ab48a4b9212 to your computer and use it in GitHub Desktop.
Remove `href` from Site Title & Site Logo
<?php
// Remove `href` from Site Title & Site Logo.
add_action( 'wp', 'remove_link_from_site_title_logo', 5 );
function remove_link_from_site_title_logo(){
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 );
add_action('astra_masthead_content','astra_remove_logo_custom_url',9);
}
function astra_logo_custom_url( $url ) {
return '';
}
function astra_remove_logo_custom_url(){
remove_filter( 'home_url', 'astra_logo_custom_url' );
}
@tuncent
Copy link

tuncent commented Apr 14, 2021

Hi Jagani! I am the new of the astra theme, how to replace the site title and blog description use this code snippets ? could you tell me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment