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

  1. gheimans
    Posted 2 years 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?


  2. devnz
    Plugin Author

    Posted 2 years 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
    Posted 2 years ago #

    Wow, yessssss, that's it.

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


  4. tgd
    Posted 1 year ago #

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

  5. tgd
    Posted 1 year 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

  • GC Testimonials
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic