Support » Plugin: Strong Testimonials » Thumnail/Featured image to link to the testimonial

  • Resolved smilingbeing

    (@smilingbeing)


    Hi Chris!

    Thanks for a well documented and capable plugin, I have done some customization and it seems to work very well so far.

    How can I make the thumbnail/featured image to link to a URL <?php wpmtst_the_thumbnail(); ?> to the specific full testimonial?

    I have tried to create a simple <a href="<?php echo get_post_permalink() ?>" around my div but it keeps messing with the layout displaying block instead of inline no matter what I do.

    Can I modify the function <?php wpmtst_the_thumbnail(); ?>? I’d like that all images linked to the specific testimonial if possible.

    Many thanks, Mattias

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Chris Dillon

    (@cdillon27)

    Hi Mattias,

    Add this to your child theme’s functions.php:

    /**
     * Link image to full testimonial.
     */
    function my_wpmtst_thumbnail_img( $img, $id ) {
      $img = '<a href="' . get_post_permalink() . '">' . $img . '</a>';
      return $img;
    }
    add_filter( 'wpmtst_thumbnail_img', 'my_wpmtst_thumbnail_img', 10, 2 );
    smilingbeing

    (@smilingbeing)

    Awesome! It works perfect. Many thanks, this plugin rocks!

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Thanks!

    Awesome!! I was looking for an answer to this also. Thanks!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Thumnail/Featured image to link to the testimonial’ is closed to new replies.