Advertisement
fauzanjeg

Change Logo for Spesific Page

Sep 27th, 2021
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.42 KB | None | 0 0
  1. /* START || Change Logo for Spesific Page */
  2. function change_logo_for_spesific_page( $url ) {
  3.     if ( is_single() ) { /* is Single Page */
  4.         $url = 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/368px-Google_2015_logo.svg.png';
  5.     }
  6.  
  7.     return $url;
  8. }
  9.  
  10. /* Desktop Logo */
  11. add_filter( 'theme_mod_jnews_header_logo', 'change_logo_for_spesific_page' );
  12. add_filter( 'theme_mod_jnews_header_logo_retina', 'change_logo_for_spesific_page' );
  13. add_filter( 'theme_mod_jnews_header_logo_darkmode', 'change_logo_for_spesific_page' );
  14. add_filter( 'theme_mod_jnews_header_logo_retina_darkmode', 'change_logo_for_spesific_page' );
  15.  
  16. /* Mobile Logo */
  17. add_filter( 'theme_mod_jnews_mobile_logo', 'change_logo_for_spesific_page' );
  18. add_filter( 'theme_mod_jnews_mobile_logo_retina', 'change_logo_for_spesific_page' );
  19. add_filter( 'theme_mod_jnews_mobile_logo_darkmode', 'change_logo_for_spesific_page' );
  20. add_filter( 'theme_mod_jnews_mobile_logo_retina_darkmode', 'change_logo_for_spesific_page' );
  21.  
  22. /* Sticky Logo */
  23. add_filter( 'theme_mod_jnews_sticky_menu_logo', 'change_logo_for_spesific_page' );
  24. add_filter( 'theme_mod_jnews_sticky_menu_logo_retina', 'change_logo_for_spesific_page' );
  25. add_filter( 'theme_mod_jnews_sticky_menu_logo_darkmode', 'change_logo_for_spesific_page' );
  26. add_filter( 'theme_mod_jnews_sticky_menu_logo_retina_darkmode', 'change_logo_for_spesific_page' );
  27.  
  28. /* END || Change Logo for Spesific Page */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement