Support » Plugin: TBTestimonials » Output Settings: conditional on gravatar?

  • Resolved Michelle Panulla


    My client doesn’t want the generic gravatar symbols to display when a testimonial has no featured image and the testimonial author has no set gravatar. I’ve managed to do a bit of hacking of the plugin and change the code so that if there is no featured image, the gravatar value is an empty string, and no photo is displayed.

    Unfortunately, my customized styling that surrounds the gravatar still shows up, so I’d really love to chuck that hack and only display the block of code related to the gravatar if there’s a featured image.

    Any suggestions or ideas about how to do this? I’ve tried changing the default blocks in tb-testimonials.php, but have only managed to break everything a few times over. Go figure. 😉 Since this listing is only on a single page, would it be better to forego the shortcode and create a custom page template that lists the testimonials?


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Travis Ballard


    A custom page template would work if you’re just listing them. Especially if you’re familiar with WordPress development, you can just run a loop on the custom post type and output the testimonials how you want.

    Unfortunately doing this internally needs some work. Thinking of adding a %featured_image% template tag and then a select box so you can select if you want to display the featured image or the gravatar. This would solve the issue I think.

    Using the built in API it’s simple enough to add the template tag but the plugin doesnt take into consideration user defined tags into the conditional statements. for example %if featured_image% show image %endif% wouldn’t work like you’d expect it to. This is definitely something that needs to be addressed in a future release.

    Travis Ballard

    Plugin Author Travis Ballard


    Also if you do end up going the route of the page template, the plugin might be overkill since all the plugin would really be doing is adding the custom post type with the meta-boxes for additional details. Unless you wanted to use the widget and other functionality as well then it would still be of use.

    Thanks, Travis! I realized later that I couldn’t do the page template, because I needed the rotating widget to do the same thing. I figured it out, though. =)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Output Settings: conditional on gravatar?’ is closed to new replies.