Created
April 18, 2018 14:06
-
-
Save rushijagani/a0c9b3e98bdb1697553d3ab48a4b9212 to your computer and use it in GitHub Desktop.
Remove `href` from Site Title & Site Logo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?