diff --git a/header.php b/header.php index d14be1b2..f689480b 100644 --- a/header.php +++ b/header.php @@ -19,6 +19,19 @@ */ ?> +ID : -1; + +if ( is_archive() || is_search() || is_404() ) { + $post_id = -1; +} + +?> + > @@ -41,18 +54,16 @@ ?> - > + data-post-id=""> ID : null; $story_id = null; $header_image_url = get_header_image(); // If this is a content page... - if ( ! is_archive() && ! is_search() && ! is_404() && $post_id ) { + if ( $post_id > 0 ) { // Type? switch ( $post->post_type ) { case 'fcn_story': @@ -74,7 +85,7 @@ } // Filter header image - if ( $header_image_url && $post_id ) { + if ( $header_image_url && $post_id > 0 ) { $header_image_url = apply_filters( 'fictioneer_filter_header_image', $header_image_url, $post_id ); }