Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Responsive Thumbnails in WordPress

  • This topic is empty.
Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #149871
    Andy Giesler
    Participant

    suis — for some reason part of jmy1138’s code didn’t get escaped correctly, but I recovered it from the HTML source.

    This works for me:

    if ( has_post_thumbnail() ) {
        $image_src = wp_get_attachment_image_src( get_post_thumbnail_id(),’thumbnail’ );
         echo '<img width="100%" src="' . $image_src[0] . '">';
    }
    
    #166979
    pbiolsi
    Participant

    Andy,

    Thanks for reposting jmy1138’s code.

    This worked perfectly for me!

Viewing 2 posts - 16 through 17 (of 17 total)
  • The forum ‘Back End’ is closed to new topics and replies.