Add Fallback Featured Image in Genesis

To set a fall back featured image in Genesis if one is not set, you can use a parameter in the filter genesis_get_image, in the code below I want to target a particular category and use a dashicon icon if the featured image is not set. This icon (or image) will then appear on the archive page.

The genesis_get_image function is at genesis/lib/functions/image.php

I am changing the value of $output only if my conditions are met otherwise the value of $output will be as per the original function.



Leave all Comment