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.
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); query_posts($args); 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(); ?> </div> <?php endwhile; else : endif; ?> </div>
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.
This plugin will do everything you need and a whole lot more: http://wordpress.org/extend/plugins/tb-testimonials/