Genesis Tutorials

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:

Leave a Reply

Your email address will not be published. Required fields are marked *