Support » Plugin: HMS Testimonials » Wrap Image & text with HTML

  • Resolved juraganpsd


    I’m using this great plugins, and i really like it. Simply the best Testimonial plugin for WordPress.
    However, i want to wrap the displayed imagae & testimonial with another HTML, let’s say a Div wrap. It would be like this:

    <div id=”photo”><img class=”image” src=”url”></div>
    <div id=”details”>
    <div class=”author”>Client Name</div>
    <div class=”testimonial”>Lorem ipsum dolor sit amet</div>
    <div class=”date”>October 16, 2013</div>

    Which file do i have to edit?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jeff K


    Hey juraganpsd,

    admin.php is the file and the code is at the bottom.

    Anytime you update the plugin your changed will be lost.

    Hello Jeff K,

    Got it, i thought it was on the other file. Great.

    Thanks for your quick response Jeff, Cheers!

    this plugin is working very nicely, however I can’t find a way to style it.

    I need to wrap together the “author” and the “testimonial” inside a div.
    I have looked at the admin.php file but I’m a beginner and I don’t know where to find the code to be changed.

    Any help, please? 🙂

    Plugin Author Jeff K


    Hey Easo,

    All the fields for each testimonial are wrapped inside a container div with a class of “hms-testimonial-container”

    Hi Jeff,
    thanks for the help.
    However I wanted to have the author and testimonial in a div separated from the image, so I need to create a new div inside “hms-testimonial-container”.

    Where can I create that new div?

    Thanks in advanced!

    Plugin Author Jeff K


    You will have to modify the template method in admin.php. It’s the last method I believe.

    Just beware that next time you update the plugin you will lose your changes.

    I’ve been looking at the admin.php file, but I can’t figure out where to place my div.
    I know very little of php at the moment.
    My guess is that I should place somewhere inside this code?

    [ Moderator note: please wrap code in backticks or use the code button. ]

    $container = HMS_Testimonials::getInstance()->options['testimonial_container'];
    					if ($container == 'div')
    						$builder .= '<div class="testimonial">'.apply_filters('hms_testimonials_system_testimonial', $testimonial['testimonial'], $testimonial).'</div>';
    					elseif ($container == 'blockquote')
    						$builder .= '
    <blockquote>'.apply_filters('hms_testimonials_system_testimonial', $testimonial['testimonial'], $testimonial).'</blockquote>
    				case 'system_source':
    					$testimonial['name'] = $purifier->purify($testimonial['name']);
    					$builder .= '<div class="author">'.apply_filters('hms_testimonials_system_source', nl2br($testimonial['name']), $testimonial).'</div>';
    				case 'system_date':
    					$date = strtotime(strip_tags($testimonial['testimonial_date']));
    					$show_date = date(HMS_Testimonials::getInstance()->options['date_format'], $date);
    					$builder .= '<div class="date">'.apply_filters('hms_testimonials_system_date', (($testimonial['testimonial_date'] == '0000-00-00 00:00:00') ? '' : $show_date), $testimonial).'</div>';
    				case 'system_url':
    					$url = '';

    But I have done some tries and it didn’t work.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Wrap Image & text with HTML’ is closed to new replies.