Support » Plugin: Testimonials Widget » [Plugin: Testimonial Widget] Shortcode or PHP function for this plugin ?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi, apologies for the late reply. This is the first wp plugin I’ve made, I didn’t realise there was a forum for it!

    At the moment the only way to access the testimonials is with a widget but to fulfill this and other similar requests I will add a shortcode and php function when I have time, that may not be soon unfortunately.

    Plugin Author Michael Cannon



    I’ve done some updates so far, see However, no shortcodes.

    What kind of shortcodes are you wanting?

    I’ve been thinking of doing some myself, more so of having a complete listing of the entries by like parameters of widgets.



    Hello ! It would be nice to have a simple shortcode to call the widget inside a page for instance 🙂

    Plugin Author Michael Cannon


    Have you checked out

    It already has shortcode built in.


    Thank you very much Michael, I didn’t found this plugin before!!! 😉

    I created a shortcode to list all testimonials on a single page:

    Add the code in the URL above and then call it like this:


    Plugin Author Michael Cannon


    Hal, Thanks for the code. I’ll drop it in and try out later this week for release. Michael

    Where do you add the code?
    I put it in functions.php and got this error

    Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/areaa1/public_html/test/wp-content/themes/striking/functions.php on line 30

    I am using this on 2 sites so far. :o)

    Did anyone get the short code to work for this plugin?

    I was using the previous version successfully using the short code [ts_shcode] but it asked me to update the plugin and now the short code doesn’t work. I can only drag it into the sidebar. I want to drop it on a page.

    Plugin Author Michael Cannon


    It sounds like your copy and failed had a newline where there shouldn’t be one.

    Did you open up functions.php to line 30 and see if the code looked correct?

    Might be as easy as joining a line, removing a spare character or the like.

    Plugin Author Michael Cannon


    Please check out 0.2.4 release. It contains shortcode for displaying testimonials by id, tags and other options.

    Fuller shortcode options listed on

    Thank you Hal Gatewood for your code sample. Do note that your code has a bad variable included in it and therefore doesn’t work. I think you accidentally pasted the code twice.

    Is there a php function for this that I could add to a template? Nice plugin btw! 😉

    Plugin Author Michael Cannon


    Technically, you can create an options array and pass it to testimonialswidget_list_shortcode() for template usage.


    $atts = array();
    echo testimonialswidget_list_shortcode($atts);

    full options

    $atts = array(
    	'ids' => false,
    	'limit' => false,
    	'random' =>  false,
    	'hide_author =>  false,
    	'hide_source' => false,
    	'tags' => false,
    echo testimonialswidget_list_shortcode($atts);

    Check Shortcode testimonialswidget_list Options for the specifics for using the configuration array on

    If you want something else, do let me know.

    Wow, quick response! Thanks Michael, much appreciated!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: Testimonial Widget] Shortcode or PHP function for this plugin ?’ is closed to new replies.