WordPress.org

Ready to get started?Download WordPress

Forums

GC Testimonials
[resolved] Image as link to full size image? (5 posts)

  1. gheimans
    Member
    Posted 1 year ago #

    Is it very complicated for me, to make a modification so that if I click on the picture in the testimonial, that I can see the picture in a larger size?

    http://wordpress.org/extend/plugins/gc-testimonials/

  2. devnz
    Member
    Plugin Author

    Posted 1 year ago #

    To do this, you will need to edit the plugin file.

    Open testimonials.php, and look for this code at around line 326:

    if(has_post_thumbnail($testimonial->ID)) {
    	$display .= '<div class="photo">'.get_the_post_thumbnail($testimonial->ID, array(100, 100)).'</div>';
    }

    and change with this:

    if(has_post_thumbnail($testimonial->ID)) {
    	$lrge_img = wp_get_attachment_image_src( get_post_thumbnail_id($testimonial->ID), 'large');
    	$display .= '<div class="photo"><a href="'.$lrge_img[0].'">'.get_the_post_thumbnail($testimonial->ID, array(100, 100)).'</a></div>';
    }

    Please note that if you update the plugin at a future date, this change will be overwritten.

  3. gheimans
    Member
    Posted 1 year ago #

    Wow, yessssss, that's it.

    It's realy what i was looking for.
    Thank you very much.

    Ger

  4. tgd
    Member
    Posted 6 months ago #

    Thanks for this. Should be part of the core of the plugin.

  5. tgd
    Member
    Posted 6 months ago #

    I've taken this a bit further and added a lighbox plugin, then added the rel="lightbox" attribute to the a tag. I have it in use on this demo site: http://temples.daisydesigns.ca/testimonials/.
    Good options to add to the single testimonial.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic