Created
September 21, 2016 07:03
-
-
Save joviczarko/4d9246d69a8a4c6df0fcee7db7e16300 to your computer and use it in GitHub Desktop.
Right way of calling the featured image on WordPress archive page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( has_post_thumbnail() ) : ?> | |
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> | |
<?php the_post_thumbnail(); ?> | |
</a> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment