开发者 |
nicethemes
juanfra andrezrv |
---|---|
更新时间 | 2020年6月29日 22:15 |
PHP版本: | 3.6 及以上 |
WordPress版本: | 4.7 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
testimonials
shortcode to show your testimonials anywhere you want from your editor.
[testimonials]See the entire list of parameters PHP Function You can use the
nice_testimonials();
function to show your testimonials in any template.
nice_testimonials();See the entire list of parameters Author information Full testimonial details, such as client's name, image and website. Widgets Display your testimonials using a widget instead of having them in the content area. Mobile friendly Nice Testimonials includes a responsive layout, and gives you the possibility to define the number of columns you want to show. Developer friendly Nice Testimonials is developed following the WordPress Coding Standards. It relies on WordPress Post Types, and includes a huge set of hooks and pluggable functions and classes, so you can customize it in any way you need.
Learn how to use the shortcode and the function in the FAQ section
nice-testimonials.zip
from your computer.nice-testimonials.zip
.nice-testimonials
directory to your computer.nice-testimonials
directory to the /wp-content/plugins/
directory.Once you installed and activated the plugin, you can go to Testimonials > Settings and tweak the options there. Those settings will also be used as the default ones for the shortcode and template tag when you're not specifying any values for them.
The basic usage of the shortcode is just [testimonials]
. That will display a list of your testimonials using the settings you entered in Testimonials > Settings.
However, you can specify values for the shortcode using the following fields:
id
: Numeric ID for a single testimonial to be displayed.columns
: The number of columns to be displayed in a list of testimonials.limit
: The maximum number of testimonials to be displayed in a list. A value of zero means nothing will be displayed. You can use -1
for no limit.image_size
: The size (in pixels) of your testimonial image.orderby
: The ordering criteria that will be used to display your testimonials. Accepted values: ID
, title
, menu_order
, date
, random
.order
: The sorting criteria that will be used to display your testimonials. Accepted values: asc
(ascendant), desc
(descendant).category
: Comma-separated numeric IDs of testimonial categories that you want to display. A value of zero means that all categories will be considered.exclude_category
: Comma-separated numeric IDs of testimonial categories that you want to exclude. A value of zero means that no categories will be excluded.include_children
: Choose if you want to display testimonials from sub-categories. Accepted values: 1
(display), 0
(not display).author
: Choose if you want to see the name of the testimonial's author. Accepted values: 1
(display), 0
(not display).avatar
: Choose if you want to see the image of the testimonial's author. Accepted values: 1
(display), 0
(not display).url
: Choose if you want to display a link to the website of the testimonial's author. Accepted values: 1
(display), 0
(not display).avatar_link
: Choose if you want the image of the testimonial's author to link to the author's website. Accepted values: 1
(display), 0
(not display).avoidcss
: Choose if you want to remove the default styles for the current list of testimonials. Accepted values: 1
(avoid styles), 0
(not avoid styles).[testimonials columns="2" limit="5" image_size="120" order="date" sort="asc"]
You can include testimonials in your own templates by using our nice_testimonials()
function. This is a very basic usage example:
```
```
As it happens with the shortcode, that code snippet will display a list of your testimonials using the settings you entered in Testimonials > Settings. However, you can give the function an array of options with specific values on how to show the list of testimonials:
id
: Numeric ID for a single testimonial to be displayed.columns
: The number of columns to be displayed in a list of testimonials.limit
: The maximum number of testimonials to be displayed in a list. A value of zero means nothing will be displayed. You can use -1
for no limit.image_size
: The size (in pixels) of your testimonial image.orderby
: The ordering criteria that will be used to display your testimonials. Accepted values: ID
, title
, menu_order
, date
, random
.order
: The sorting criteria that will be used to display your testimonials. Accepted values: asc
(ascendant), desc
(descendant).category
**: Comma-separated numeric IDs of testimonial categories that you want to display. A value of zero means that all categories will be considered.exclude_category
: Comma-separated numeric IDs of testimonial categories that you want to exclude. A value of zero means that no categories will be excluded.include_children
: Choose if you want to display testimonials from sub-categories. Accepted values: 1
(display), 0
(not display).author
: Choose if you want to see the name of the testimonial's author. Accepted values: 1
(display), 0
(not display).avatar
: Choose if you want to see the image of the testimonial's author. Accepted values: 1
(display), 0
(not display).url
: Choose if you want to display a link to the website of the testimonial's author. Accepted values: 1
(display), 0
(not display).avatar_link
**: Choose if you want the image of the testimonial's author to link to the author's website. Accepted values: 1
(display), 0
(not display).avoidcss
: Choose if you want to remove the default styles for the current list of testimonials. Accepted values: 1
(avoid styles), 0
(not avoid styles).You can load a custom stylesheet by using wp_enqueue_script()
and adding your custom CSS to your own file. However, if you really want to get rid of the default CSS of Nice Testimonials, so you can avoid overriding our styles, you can check the "Avoid Plugin CSS" option in Testimonials > Settings.
nice_image()
.plugins_loaded
.