arie_cristianD

change dark mode logo on certain categories

Aug 3rd, 2025
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. add_filter( 'theme_mod_jnews_header_logo_darkmode', 'j_change_dark_header_logo' );
  2. add_filter( 'theme_mod_jnews_header_logo_retina_darkmode', 'j_change_dark_header_logo_retina' );
  3.  
  4.  
  5. /**
  6.  * Change Retina Dark logo URL.
  7.  *
  8.  * @param string $logo Logo URL.
  9.  * @return string
  10.  */
  11. function j_change_dark_header_logo_retina( $logo ) {
  12.     if ( j_is_selected_category() ) {
  13.         $logo = 'http://localhost.local/wp-content/uploads/2025/07/[email protected]'; /* change with your retina logo URL */
  14.     }
  15.     return $logo;
  16. }
  17.  
  18. /**
  19.  * Change Dark logo URL.
  20.  *
  21.  * @param string $logo Logo URL.
  22.  * @return string
  23.  */
  24. function j_change_dark_header_logo( $logo ) {
  25.     if ( j_is_selected_category() ) {
  26.         $logo = 'http://localhost.local/wp-content/uploads/2025/07/footer_logo.png'; /* change with your logo URL */
  27.     }
  28.     return $logo;
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment