Viewing 4 replies - 1 through 4 (of 4 total)
  • anonymized-13171256

    (@anonymized-13171256)

    Try this in your page template:

    <?php echo do_shortcode("[random-testimonial category="xx" limit="x"]"); ?>

    from http://css-tricks.com/snippets/wordpress/shortcode-in-a-template/.

    Thread Starter ssphillips

    (@ssphillips)

    Thanks. I tried that but it doesn’t work. I believe that only works with shortcodes baked into the WordPress code.

    anonymized-13171256

    (@anonymized-13171256)

    Sorry, I cut-n-pasted without testing properly. Forgot to change one pair of double quotes to single quotes. Try this:

    <?php echo do_shortcode('[random-testimonial category="xx" limit="x"]'); ?>

    A shortcode is a shortcode. This works on mine.

    Thread Starter ssphillips

    (@ssphillips)

    Thanks Chris. I swear I had the exact same thing earlier, but I must have had a typo because this works perfectly!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Testimonials in Template?’ is closed to new replies.