Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Created May 14, 2019 07:10
Show Gist options
  • Select an option

  • Save yousufansa/3be910769ced0c839ede785380ca413a to your computer and use it in GitHub Desktop.

Select an option

Save yousufansa/3be910769ced0c839ede785380ca413a to your computer and use it in GitHub Desktop.
Electro - Theme Option Site Logo Integration With Wordpress Custom Logo
if ( !function_exists( 'electro_child_set_custom_logo' ) ) {
function electro_child_set_custom_logo() {
if( function_exists( 'is_redux_activated' ) && is_redux_activated() ) {
global $electro_options;
if ( ! empty( $electro_options['site_header_logo']['id'] ) ) {
$custom_logo_id = $electro_options['site_header_logo']['id'];
set_theme_mod( 'custom_logo', $custom_logo_id );
} else {
set_theme_mod( 'custom_logo', '' );
}
}
}
}
add_action( 'init', 'electro_child_set_custom_logo' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment