Created
August 24, 2018 13:07
-
-
Save rushijagani/a7f3382e0c4231595d59d3137435a56e to your computer and use it in GitHub Desktop.
Add secondary logo for for a specific pages.
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
<?php | |
/** Add secondary logo for for a specific pages. */ | |
add_filter( 'get_custom_logo', 'custom_secondary_logo_callback' ); | |
/** | |
* @link https://codex.wordpress.org/Conditional_Tags | |
*/ | |
function custom_secondary_logo_callback( $logo ){ | |
$your_custom_logo = "Your Custom Logo";// Add your custom logo maerkup instead. | |
// is_singular() find more conditional tags from here -- https://codex.wordpress.org/Conditional_Tags | |
if ( is_singular() ) { | |
$logo = $your_custom_logo; | |
} | |
return $logo; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment