Last active
August 29, 2015 14:13
-
-
Save eri-trabiccolo/57a5645c9ee9c7cd6e11 to your computer and use it in GitHub Desktop.
Different logo in a certain page/post
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_filter('tc_logo_src' ,'my_logo'); | |
function my_logo($logo_src){ | |
if ( ! is_singular() ) | |
return; | |
$mylogo_src = array( | |
//page_or_post id => url | |
'31' => 'http://', | |
'4' => 'http:// ' | |
); | |
$current_id = get_the_ID(); | |
if ( array_key_exists($current_id, $mylogo_src) ) | |
return $mylogo_src[$current_id]; | |
return $logo_src; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment