Skip to content

Instantly share code, notes, and snippets.

@rushijagani
Created August 24, 2018 13:07
Show Gist options
  • Save rushijagani/a7f3382e0c4231595d59d3137435a56e to your computer and use it in GitHub Desktop.
Save rushijagani/a7f3382e0c4231595d59d3137435a56e to your computer and use it in GitHub Desktop.
Add secondary logo for for a specific pages.
<?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