Only Display Archive Image If Featured Image Added

This code enables you to remove the fallback image displayed when no featured image is added. Genesis uses the attachment i.d for any image within the content area if no featured image is set and this image will display on archive pages.

If you don’t want any image shown on archive pages when you haven’t added a image to the featured image meta box, then you can use this code to make sure no image is displayed.

You can also use this code to conditionally remove the fallback featured image form any type of archive including blog listings page, author, blog, category, search, and tag archive pages.

Here’s the code snippets for logged in members:

Related Tutorials

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.