Does anybody have an idea how to add testimonials with an image in WordPress? Is there is any plugin that fulfills my requirement? I searched but did not find any. It must support PHP version 4.4.9.

migrated from stackoverflow.com Feb 22 '11 at 3:08

This question came from our site for professional and enthusiast programmers.


Make a new category called Testimonials then, in your theme folder add a new file called testimonials.php.

Add this in the newly created file:

<div id="testimonials">
    <?php $args = array('caller_get_posts' => 1, 'post_type' => 'testimonials', 'post_status' => 'publish', 'posts_per_page' => 5);
    if (have_posts()) : while (have_posts()) : the_post(); 
    $image = get_post_meta($post->ID, 'testimonial-image', true);

        <div class="testimonail">
            <img src="<?php echo $image; ?>" width="" height="" alt="<?php the_title(); ?>" />
            <h2><?php the_title(); ?></h2>
            <?php the_content(); ?>

    <?php endwhile; else : endif; ?>

Then add where do you want the testimonials to show. Example footer.php

Now you can add testimonials by simply adding a new post and fill it under the Testimonials category. As for the image, make a new custom field called testimonial-image and for the value add the path to the image (ex: http://example.com/image.png).

And you are good to go.

  • Thanks for Reply,But I want to manage this testimonial separate from post. – shalu Dec 1 '10 at 7:59
  • Then install wordpress.org/extend/plugins/custom-post-type-ui and add a new custom post type called Testimonials. Then use my code. – Vlad.P Dec 1 '10 at 8:04
  • Hello thanks for reply I have created testimonial custom post type but i also need to show image for each testimonials.From this custom post type i m just able to insert title and content from where we can insert image .please let me know its very urgent – shalu Dec 3 '10 at 6:02
  • make a new custom field called testimonial-image and for the value add the path to the image (ex: example.com/image.png). – Vlad.P Dec 3 '10 at 6:24
  • OK Thanks sir but my problem resolved .I have managed this through featured image.Thanks – shalu Dec 3 '10 at 7:42

This plugin will do everything you need and a whole lot more: http://wordpress.org/extend/plugins/tb-testimonials/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.