Advertisement
arie_cristianD

change the logo only on single post page

Oct 27th, 2024
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. add_filter( 'theme_mod_jnews_header_logo', 'change_jnews_header_logo' );
  2. add_filter( 'theme_mod_jnews_header_logo_retina', 'change_jnews_header_logo_retina' );
  3.  
  4.  
  5.  
  6. function change_jnews_header_logo( $value ) {
  7.  
  8.     if ( is_single() ) {
  9.         $value = 'http://your-single-post-logo-url.png';
  10.     }
  11.     return $value;
  12. }
  13.  
  14. function change_jnews_header_logo_retina( $value ) {
  15.  
  16.     if ( is_single() ) {
  17.         $value = 'http://your-single-post-logo-retina-url.png';
  18.     }
  19.     return $value;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement