Featured Image Fallback in Bricks

This Pro tutorial shows bricks/element/settings filter of Bricks builder can be used to specify the ID of an image in the WordPress Media Library that should be shown for posts that do not have a featured image set in a query loop.

Note that it is also possible alternatively to simply add another Image element (besides the one for featured image) and use conditions to output one of them depending on whether each post has a featured image or not.

Add the following in child theme's functions.php or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Instant access to 390+ Bricks code tutorials with BricksLabs Pro