Current File : /home/virtualki/22346/wp-content/themes/Boldtheme/inc/extras.php
<?php
/**
 * Custom functions that act independently of the theme templates.
 *
 * Eventually, some of the functionality here could be replaced by core features.
 *
 * @package Bold
 */

/**
 * Adds `c-header--no-cover` custom class if site cover exist
 */
function bold_header_class() {
  $classes = '';

  if ( is_home() && !has_header_image() ) {
    $classes = 'c-header--no-cover';
  }

  if ( is_search() ) {
    $classes = 'c-header--no-cover';
  }

  if ( is_archive() || is_tag() || is_category() ) {
    $classes = 'c-header--no-cover';
  }

  if ( is_paged() ) {
    $classes = 'c-header--no-cover';
  }

  if ( is_404() ) {
    $classes = 'c-header--no-cover';
  }

  return $classes;
}