Add 404 to disallowed cpt/term images

This commit is contained in:
Robin Cornett
2015-03-03 16:28:19 -05:00
parent be99d32171
commit e189ec78dd
2 changed files with 3 additions and 2 deletions
@@ -72,7 +72,7 @@ class Display_Featured_Image_Genesis_Common {
$object = get_queried_object();
// cpt
if ( is_main_query() && ( ! is_author() && ! is_admin() && ! is_search() ) ) {
if ( is_main_query() && ( ! is_author() && ! is_admin() && ! is_search() && ! is_404() ) ) {
if ( $object->name ) { // results in post type on cpt archive
$post_type = $object->name;
}
+2 -1
View File
@@ -91,6 +91,7 @@ function display_featured_image_genesis_get_default_image_url( $size='displayfea
function display_featured_image_genesis_get_cpt_image_id() {
$no_show = array(
$no_show[] = is_404(),
$no_show[] = is_admin(),
$no_show[] = is_author(),
$no_show[] = is_page(),
@@ -146,7 +147,7 @@ function display_featured_image_genesis_get_cpt_image_url( $size='displayfeature
*/
function display_featured_image_genesis_add_archive_thumbnails() {
if ( is_singular() || is_admin() ) {
if ( is_singular() || is_admin() || is_404() ) {
return;
}