Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question

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

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

2 Answers 2

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["                  <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2015 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2015.5.22.2603\r\n            </div>\r\n                <div id=\"additional-notices\">\r\n                    WordPress is a trademark of the WordPress Foundation, registered in the US and other countries. This site is not affiliated with the WordPress Foundation in any way.\r\n         "], "copyright__copyright__copyright": ["field called testimonial-image and for the value add the path to the image (ex: http://example.com/image.png).\n\nAnd you are good to go.\n\nshare|improve this answer\n\nThis plugin will do everything you need and a whole lot more: http://wordpress.org/extend/plugins/tb-testimonials/\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}