Answers for "wordpress php featured if ( has_post_thumbnail() )"

PHP
0

wordpress if thumbnail show else

<?php if ( has_post_thumbnail() ) {
the_post_thumbnail();
} else { ?>
<img src="<?php bloginfo('template_directory'); ?>/images/default-image.jpg" alt="<?php the_title(); ?>" />
<?php } ?>
Posted by: Guest on March-13-2020

Code answers related to "wordpress php featured if ( has_post_thumbnail() )"

Browse Popular Code Answers by Language