Template defines the HTML structure of each outputted testimonial. Templates use special syntax which is covered in this guide.
Templates view
Name of the template is just for the user. It should be picked wisely, so it would tell about the use of the template. The template content is HTML with special tags that FV Testimonials parses out and replaces it for real data. When using [testimonial]
shortcode, templates are referenced by their IDs (C1, S1 etc.) and not by their names. IDs are displayed next to the template names.
FV Testimonials template tags
Available tags:
[name]
– Testimonial name[company]
– Testimonial company[id]
– ID[post-title]
– Title of post, based on plugin settings[slug]
– Slug[category-slug]
– Category slug[anchor]
– Anchor link to main testimonials page[permalink]
– Permalink[excerpt]
– Testimonial excerpt[content]
– Testimonial content[links]
– List of all links[image]
– The main image[image-{number}]
– Additional images. Example [image-two], [image-three]…[gallery]
– Lightbox gallery
Images tags:
[image-{number}]
– Additional images. Example [image-two], [image-three]…[image size="medium"]
– you can further specify, what size the image should be – either the default sizes (thumbnail, medium, large, full) or check your theme for any custom ones.[if image-one] ... [/if]
– If the testimonial doesn’t have images, code between these conditional par tags will be outputted.
Previously some of the tags were used in pairs, now all the tags are used is singles, except the conditional one.
Template styles
Each template has also its own style (Classic, Grid, Sidebar, Slideshow). This generates a wrapper around the listed testimonials.
The style names already explain, what these styles do:
- Classic – shows the testimonials like a simple archive
- Grid – puts them in three columns
- Sidebar – is narrow and can be used to show one random testimonial in a column
- Slideshow – displays testimonials in a simple slider.
Example of a simple template:
<div class="fvtestimonial fvt-main" id="[slug]"><div class="fvt-thumb">[image]</div> <div class="fvt-content"><h3 class="entry-title">[post-title]</h3> [content]</div></div>