If custom image header does not exist display text header
Try this: <?php //Custom header // Check if this is a post or page, if it has a thumbnail, and if it’s a big one if ( is_singular() && has_post_thumbnail( $post->ID ) && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘post-thumbnail’ )) && $image[1] >= HEADER_IMAGE_WIDTH ) : // We … Read more