Hello,
I'd like to keep this plugin because I love it for its simplicity and efficiency, however, I need to put the widget inside the template via a PHP call function or a shortcode, is there a way to do that ?
Thank you.
Hello,
I'd like to keep this plugin because I love it for its simplicity and efficiency, however, I need to put the widget inside the template via a PHP call function or a shortcode, is there a way to do that ?
Thank you.
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.
evo252,
I've done some updates so far, see http://wordpress.org/support/topic/plugin-testimonial-widget-wrote-multi-instance-widget?replies=2#post-2371089. 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.
Ciao!
Michael
Hello ! It would be nice to have a simple shortcode to call the widget inside a page for instance :)
Have you checked out http://wordpress.org/extend/plugins/quotes-collection/?
It already has shortcode built in.
Michael
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:
[testimonialswidget_list]
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.
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.
Please check out 0.2.4 release. It contains shortcode for displaying testimonials by id, tags and other options.
Fuller shortcode options listed on http://wordpress.org/extend/plugins/testimonials-widget/.
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! ;-)
Technically, you can create an options array and pass it to testimonialswidget_list_shortcode() for template usage.
default
$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 http://wordpress.org/extend/plugins/testimonials-widget/.
If you want something else, do let me know.
Wow, quick response! Thanks Michael, much appreciated!
This topic has been closed to new replies.