Hello guys,
I'm trying to insert link to my thumbnail images, but I'm stuck, can someone please help me?
My code is:
Thank you for help!
Kind regards
-----------------------
After reading this url:
https://codex.wordpress.org/Function_Reference/the_post_thumbnail
I notice this solution:
But my php knowledge is very very poor, and I dont know how can I edit my code:
As I can see, I need to put the_post_thumbnail( 'full' ); inside the a tag, but how? Any ideas?
Thanks!
I'm trying to insert link to my thumbnail images, but I'm stuck, can someone please help me?
My code is:
PHP:
<?php if(has_post_thumbnail()) :the_post_thumbnail( 'full' );else : ?>
Thank you for help!
Kind regards
-----------------------
After reading this url:
https://codex.wordpress.org/Function_Reference/the_post_thumbnail
I notice this solution:
PHP:
<?php if ( has_post_thumbnail() ) : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail(); ?>
</a>
<?php endif; ?>
But my php knowledge is very very poor, and I dont know how can I edit my code:
PHP:
<?php if(has_post_thumbnail()) :
the_post_thumbnail( 'full' );
else : ?>
As I can see, I need to put the_post_thumbnail( 'full' ); inside the a tag, but how? Any ideas?
Thanks!
Last edited: