Skip to content

Instantly share code, notes, and snippets.

@marklchaves
Last active September 27, 2020 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marklchaves/d2efb67bc72726b0cc4544fe18f7e2e4 to your computer and use it in GitHub Desktop.
Save marklchaves/d2efb67bc72726b0cc4544fe18f7e2e4 to your computer and use it in GitHub Desktop.
Override the main site logo's link using an Avada PHP hook.
<?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