/**
  * Template for Featured Header Image from theme options
  *
  * To override this in a child theme
  * simply create your own catchkathmandu_featured_pagepost_image(), and that function will be used instead.
  *
  * @since Catch Kathmandu Pro 1.0
  */
 function catchkathmandu_featured_overall_image()
 {
     global $post, $wp_query, $catchkathmandu_options_settings, $catchkathmandu_options_defaults;
     $options = $catchkathmandu_options_settings;
     $defaults = $catchkathmandu_options_defaults;
     $enableheaderimage = $options['enable_featured_header_image'];
     $featured_image = $options['page_featured_image'];
     // Front page displays in Reading Settings
     $page_on_front = get_option('page_on_front');
     $page_for_posts = get_option('page_for_posts');
     // Get Page ID outside Loop
     $page_id = $wp_query->get_queried_object_id();
     if ($enableheaderimage == 'excludehome') {
         if (is_front_page() || is_home() && $page_for_posts != $page_id) {
             return false;
         } else {
             catchkathmandu_featured_image();
         }
     } elseif ($enableheaderimage == 'allpage' || ($enableheaderimage == 'homepage' || $enableheaderimage == 'postpage') && (is_front_page() || is_home() && $page_for_posts != $page_id)) {
         catchkathmandu_featured_image();
     } elseif ($enableheaderimage == 'postpage') {
         if (is_page() || is_single()) {
             catchkathmandu_featured_page_post_image();
         } else {
             catchkathmandu_featured_image();
         }
     } elseif ($enableheaderimage == 'pagespostes' && (is_page || is_single)) {
         catchkathmandu_featured_page_post_image();
     } else {
         echo '<!-- Disable Header Image -->';
     }
 }
 /**
  * Template for Featured Header Image from theme options
  *
  * To override this in a child theme
  * simply create your own catchkathmandu_featured_pagepost_image(), and that function will be used instead.
  *
  * @since Catch Kathmandu Pro 1.0
  */
 function catchkathmandu_featured_overall_image()
 {
     global $post, $wp_query, $catchkathmandu_options_settings;
     $options = $catchkathmandu_options_settings;
     $enableheaderimage = $options['enable_featured_header_image'];
     // Front page displays in Reading Settings
     $page_for_posts = get_option('page_for_posts');
     // Get Page ID outside Loop
     $page_id = $wp_query->get_queried_object_id();
     // Check Enable/Disable header image in Page/Post Meta box
     if (is_page() || is_single()) {
         //Individual Page/Post Image Setting
         $individual_featured_image = get_post_meta($post->ID, 'catchkathmandu-header-image', true);
         if ($individual_featured_image == 'disable' || $individual_featured_image == 'default' && $enableheaderimage == 'disable') {
             echo '<!-- Page/Post Disable Header Image -->';
             return;
         } elseif ($individual_featured_image == 'enable' && $enableheaderimage == 'disable') {
             catchkathmandu_featured_page_post_image();
         }
     }
     // Check Homepage
     if ($enableheaderimage == 'homepage') {
         if (is_front_page() || is_home() && $page_for_posts != $page_id) {
             catchkathmandu_featured_image();
         }
     }
     // Check Excluding Homepage
     if ($enableheaderimage == 'excludehome') {
         if (is_front_page() || is_home() && $page_for_posts != $page_id) {
             return false;
         } else {
             catchkathmandu_featured_image();
         }
     } elseif ($enableheaderimage == 'allpage') {
         catchkathmandu_featured_image();
     } elseif ($enableheaderimage == 'postpage') {
         if (is_page() || is_single()) {
             catchkathmandu_featured_page_post_image();
         } else {
             catchkathmandu_featured_image();
         }
     } elseif ($enableheaderimage == 'pagespostes') {
         if (is_page() || is_single()) {
             catchkathmandu_featured_page_post_image();
         }
     } else {
         echo '<!-- Disable Header Image -->';
     }
 }