Although Uncode is flexible, with a commercial theme we try first to replicate the most common web design and usability patterns. Multiple Logos within the same site is not common and could disorient most visitors. In any case, if you need to apply different Logos to different pages for special needs, you can use this hook (in the Child Theme).
/********************** * * Filter logo and logo height according with post ID (or any other condition) * @param string $val The default menu type * @return string $option_id The option ID name * **********************/ function uncode_child_filter_display_logo( $val, $option_id ) { global $post; //## Single Logo example ##//
$alt_logo = 104439; // alternative logo IDs //## or Switchable Logo example ##// $alt_logo_light = 103627; // alternative logo IDs - light skin $alt_logo_dark = 103619; // alternative logo IDs - dark skin //## -- ##// $logo_height = 20; //logo height $logo_height_mobile = 16; //logo height on mobile $ids = array(104465, 103695); //your page IDs if ( $post && in_array( $post->ID, $ids ) ) { if ( $option_id === '_uncode_logo' ) { $val = $alt_logo; } elseif ( $option_id === '_uncode_logo_light' ) { $val = $alt_logo_light; } elseif ( $option_id === '_uncode_logo_dark' ) { $val = $alt_logo_dark; } elseif ( $option_id === '_uncode_logo_height' ) { $val = $logo_height; } elseif ( $option_id === '_uncode_logo_height_mobile' ) { $val = $logo_height_mobile; } } return $val; } add_filter( 'uncode_ot_get_option', 'uncode_child_filter_display_logo', 10, 2 );
Comments
0 comments
Article is closed for comments.