Default Featured Image
-
Is there a way to show a specific default image if there is no featured image on a post within the Spectra Post Grid. I know how to add items before and after blocks within the grid using hooks and filters, but I can’t find documentation anywhere to use a specific image if no image is found.
I am using it throughout the rest of my website fine with the following<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } else { $image = get_field('default_header','options'); ?> <img src="<?php echo esc_url($image['url']); ?>" alt="<?php echo esc_attr($image['alt']); ?>" /> <?php } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Default Featured Image’ is closed to new replies.