Last active
December 11, 2015 08:49
-
-
Save lswilson/4575933 to your computer and use it in GitHub Desktop.
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
add_action( 'template_redirect', 'ngd_multiple_logos' ); | |
function ngd_multiple_logos() { | |
sp_remove_action('sb_header', 'sp_header_settings', 'logo'); | |
sp_add_action( 'sb_header', 'ngd_logo'); | |
} | |
function ngd_logo() { | |
// We need the $post global to determine parent_page relationships | |
global $post; | |
$logo_container = apply_filters( 'sb_logo_container', (is_front_page()) ? 'h1' : 'h2' ); | |
echo '<div id="nglogo" class="left">'; | |
if ( is_page( 284 ) || 284 == $post->post_parent ) { | |
$logo = ( $logo = sb_get_option( 'lily-logo' ) ); | |
echo '<' . $logo_container . ' id="site-title"><a href="'.home_url().'" title="'.esc_attr(get_bloginfo('name')).'"><img class="lily" src="'.esc_url($logo).'" alt="'.esc_attr(get_bloginfo('name')).'" /><span id="blog-title">'.esc_html(get_bloginfo('name')).'</span></a></' . $logo_container . '>'; | |
} else { | |
$logo = ( $logo = sb_get_option( 'logo-image' ) ); | |
echo '<' . $logo_container . ' id="site-title"><a href="'.home_url().'" title="'.esc_attr(get_bloginfo('name')).'"><img clas="ngdata" src="'.esc_url($logo).'" alt="'.esc_attr(get_bloginfo('name')).'" /><span id="blog-title">'.esc_html(get_bloginfo('name')).'</span></a></' . $logo_container . '>'; | |
} | |
echo '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment