WordPress.org

Support

Support » Plugins and Hacks » Thumbnail rather than full image?

Thumbnail rather than full image?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Brett Shumaker
    Member

    @brettshumaker

    Not as of yet, unfortunately. I know it’s not the ideal solution, but you can just scale the image down with CSS.

    Or if you feel comfortable editing the plugin’s php file, I can let you know where to make the edits to allow it. And then I’ll include this feature in the next release, I should have had it in there anyway. 🙂

    Thanks!
    Brett

    mpmchugh
    Participant

    @mpmchugh

    Sure. I can add php if you let me know what to add.

    Thanks!

    -Michael

    Plugin Author Brett Shumaker
    Member

    @brettshumaker

    Alright, here we go. Swap out the code here: http://pastebin.com/BexT5HBj for the user-view-show-staff-list.php and use this shortcode: [simple-staff-list image_thumbnail="yes"]

    Julie Kuehl
    Participant

    @juliekuehl

    I’ll add my voice to requesting this as a future feature.

    I’ll +1 for adding this to the next release.

    Hey Brett

    is this if statement working

    if(has_post_thumbnail()){
    
                    $photo_url = wp_get_attachment_image_src( get_post_thumbnail_id(), $image_size );
                    $photo_url = $photo_url[0];
                    $photo = '<img class="staff-member-photo" src="'.$photo_url.'" alt = "'.$title.'">';
                }else{
                    $photo_url = '';
                    $photo = '';
                }

    cause even if the staff member doesn’t have an image it still outputs
    an <img> tag but without the src.

    Plugin Author Brett Shumaker
    Member

    @brettshumaker

    Note taken…I’ll be adding this feature. 🙂

    @haleeben: Yes, it does work. What’s probably happening is that you are manually using <img class="staff-member-photo" src="[staff-photo-url]" alt="[staff-name] : [staff-position]"> or something similar in your Staff Loop. I have it this way in the default Staff Loop to demonstrate a usage case for wanting to use the [staff-photo-url] vs. just [staff-photo], which does not echo anything if there is no post thumbnail.

    Hey Brett

    Yeah that was it, I hadn’t changed the default template, thanks for the help.

    Plugin Author Brett Shumaker
    Member

    @brettshumaker

    No problem!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Thumbnail rather than full image?’ is closed to new replies.