artemsemkin

Rhye theme: different header color theme in blog posts

May 14th, 2022 (edited)
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. <?php
  2.  
  3. // Main header theme: dark | light
  4. add_filter( 'theme_mod_header_main_theme', function( $default ) {
  5.   if ( is_singular( 'post' ) ) {
  6.     $default = 'light';
  7.   }
  8.  
  9.   return $default;
  10. });
  11.  
  12. // Main header logo: primary | secondary
  13. add_filter( 'theme_mod_header_main_logo', function( $default ) {
  14.   if ( is_singular( 'post' ) ) {
  15.     $default = 'secondary';
  16.   }
  17.  
  18.   return $default;
  19. });
  20.  
Add Comment
Please, Sign In to add comment