• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Set Fallback Featured Image For Each Category

This code enables you to set a different fallback featured image for all posts in each category when one has not been set.

Otherwise, the featured image you set will be shown instead.

The code also includes a default fallback image ( default-image.png ) for posts not included in any of the categories you include in the code.

The images are pulled from your child themes images folder.

The code uses the genesis_pre_get_image filter therefore only works in Genesis.

You could also code it this way:

The only problem with the above code is it doesn’t display the same as your Genesis > Theme Settings > Featured Images. Its not aligned according to your settings and isn’t linked back to the single post.

Set Default Image For All Empty Images

This code pulls a image from your child themes images folder and displays it as a featured image on all archive pages when one is not set:

Register for full access

Featured Image

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags