/ Published in: PHP
This is an example of omitting the width and height attributes from a thumbnail img tag in Wordpress. Useful if you are working on a responsive design. Use inside The Loop.
Expand |
Embed | Plain Text
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail' ); if ($image) : ?> <?php endif; ?>
You need to login to post a comment.
