wordpress if thumbnail show else

Solutions on MaxInterview for wordpress if thumbnail show else by the best coders in the world

showing results for - "wordpress if thumbnail show else"
Nerissa
06 Mar 2017
1<?php if ( has_post_thumbnail() ) {
2the_post_thumbnail();
3} else { ?>
4<img src="<?php bloginfo('template_directory'); ?>/images/default-image.jpg" alt="<?php the_title(); ?>" />
5<?php } ?>
6