Foliovision Forums FV Testimonials How to … Can a testimonial be embedded into a widget?

  • Can a testimonial be embedded into a widget? Similarly could multiple testimonials based on {options} be embedded into a widget?

Viewing 16 replies - 1 through 16 (of 16 total)
  • Hi Andrew,

    at the moment you can insert testimonials either directly into the template or into the PHP widget. You need to use following code:

    <?php echo apply_filters('the_content', '[Testimonials: all]'); ?>

    Adjust the properties for testimonials to be displayed as you wish.

    We are planning to release a new version of testimonials plugin where this issue will be fixed and the shortcode will work in normal Text widget as well. Until then this workaround works.
    Hope this helps,
    Zdenka

    Thanks Zdenka!
    That works to get full testimonials into a widget. Could I truncate the testimonials at a certain number of characters and insert a “read more” link to the full testimonials page?

    Hi Andrew,

    excerpts are not supported in the basic version. Pro version supports excerpts and fully customisable templates.

    Zdenka

    Could you point me to documentation on how to use excerpts in pro version? I don’t see the parameter in the documentation.
    Thanks,
    Andrew

    Hi Andrew,

    since you have the pro version, the easiest way for you to fully customise the testimonials output is to create a template for it, and them use this template in the shortcode. Advantage of templates is that you can adjust html just as you need. Here’s guide to templates which might help you to get started.

    The very basic template could be just
    [title ,]
    [excerpt]

    But I suggest you to check the range of other tags that can be used and fill out the html as well.

    Zdenka

    I have implemented template in the pro version of testimonials. I have one template that is working fine and another that does not change the style of the content on the testimonials page.

    My template contents is:
    <p style=”font-size:18px; color:#3366CC; font-family:arial”> [title] </p><p style=”font-size:12px; color:#404040; font-family:arial”>[content]</p>

    The call to the fvtestimonials content in the page is:
    [Testimonials: -t 2 all]

    the page in question can be viewed at:
    “http://www.corepractice.com.php5-20.dfw1-1.websitetestlink.com/testimonials”

    I have “output default css” and “use texy” – unchecked in the options.

    what do I need to do to have the template affect all the page contents the same way?

    Thanks,
    Andrew

    Hi Andrew,

    When looking into the source code of your testimonials page it seems that the heading p tag is styled, but the content one isn’t. To me this looks like your actual ‘content’ of the testimonial already contains a p tag which causes closure of the above one. Can you please check in your testimonials, their content? Are you using p tags there?
    To avoid this I would suggest changing the p tag in your template for div for example, with the same styling.
    Hope this helps,
    Zdenka

    is there any way to display the excerpt anywhere in my theme? Thanks

    Hello Von,

    only Pro version supports excerpts and fully customisable templates.

    Zdenka

    Are there any template examples in the Pro version that you can point me to? I’m not loving the look but don’t know where to begin!

    How do we just feature one testimonial in the widget and have it rotate from page to page? It seems a big disadvantage that a widget feature is not included with this plugin.

    Hi Lisa,

    we are planning a brand new release of testimonials plugin, as well as their pro version. It will come out in May.
    The new version will have shortcodes that can be used within normal text widgets.
    Thanks for this suggestion to create a dedicated widget, we will certainly consider this in this or in one of the next releases!
    Guide to templates is here, and at the very end of the article there’s an example of simple template, which you can start with.

    Thank you,
    Zdenka

    Any update on a new release for this that includes random testimonials in the widget?

    Hello Lisa,

    I think this widget will only be available in PRO version and we have released a new basic version to WP Repository in order to release a brand new basic version (which is already finished) with related pro version in August.

    Best regards,
    Peter

    I still can’t seem to get the random testimonial to work in my widget. I have the PRO version. Here is my widget code:

    <h4>[title]</h4><p>[content]</p><p>Read more</p>

    Here is my code I am using in my PHP widget:

    <div id=”testimonial-widget”><?php echo apply_filters(‘the_content’, ‘[Testimonials: -c1 -t1 ]’); ?></div>

    Hello Kriselle,

    yes the code you’re using is displaying only the top most approved testimonial. You should use some of the built functions. Here is a sample code that displays random testimonials. It can be inserted into PHP widget.

    
    <?php fpt_get_testimonials( array( 'where' => array( 'status' => 'approved' ), 'order' => array( 'rand()' => 'ASC' ), 'limit' => 1 ), true, 1 ); ?>
    
    

    It echos the result automatically. The last 1 in the code is for template number, you can change it to your convenience.

    But be aware that this may be a little slow since using MySQL rand() for sorting is highly ineffective. If you have only like few hundreds of testimonials it should be fine.

    Best regards,
    Peter

Viewing 16 replies - 1 through 16 (of 16 total)
Reply To: Can a testimonial be embedded into a widget?