Last active
September 27, 2020 22:54
-
-
Save marklchaves/d2efb67bc72726b0cc4544fe18f7e2e4 to your computer and use it in GitHub Desktop.
Override the main site logo's link using an Avada PHP hook.
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 | |
/** | |
* Override Custom Logo for a Certain Page | |
*/ | |
function my_logo_link($my_new_link) { | |
if ( is_page(2) ) { | |
return $my_new_link = array( 'class' => 'fusion-logo-link', 'href' => "https://caughtmyeye.dev" ); | |
} else { | |
return array( 'class' => 'fusion-logo-link', 'href' => ( $custom_link = Avada()->settings->get( 'logo_custom_link' ) ) ? esc_url( $custom_link ) : esc_url( home_url( '/' ) ), ); | |
} | |
} | |
add_filter('avada_logo_anchor_tag_attributes', 'my_logo_link'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment