Back

Wordpress PHP

How To Add A Default Feature Image

In your php file, within the loop, add in this code

<?php
if ( has_post_thumbnail() ) {
    the_post_thumbnail();
}
else {
    echo '<img src="'. esc_url( site_url() ) .'/wp-content/uploads/2016/07/header-place-holder.png" />';
}
?>