the_post_thumbnail if/else
-
Hello,
I’m trying to insert link to my thumbnail images, but I’m stuck with elseif structure.
<?php if ( has_post_thumbnail() ) { <a href=<?php the_permalink() ?>"><img src="<?php the_post_thumbnail(); ?>" width="50x" height="50px" title="<?php the_title(); ?>" /></a> } else <a href=<?php the_permalink() ?>"><img src="image.png" width="50x" height="50px" title="<?php the_title(); ?>" /></a> ?>
I know this is childishly simple to some of you, but I’m hitting head against a wall.
Thank you for help!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘the_post_thumbnail if/else’ is closed to new replies.