only display img if there is a img
This commit is contained in:
parent
fb3eb0c906
commit
8db723182a
|
@ -3,7 +3,15 @@
|
||||||
<header>
|
<header>
|
||||||
|
|
||||||
<h3><?php echo get_the_title(); ?></h3>
|
<h3><?php echo get_the_title(); ?></h3>
|
||||||
<img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="<?php echo get_the_title(); ?>">
|
|
||||||
|
<?php
|
||||||
|
if ( has_post_thumbnail() ) {
|
||||||
|
?>
|
||||||
|
<img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="<?php the_title_attribute(); ?>">
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue