开发者 |
ivycat
sewmyheadon jasonm4563 gehidore dgilfoy |
---|---|
更新时间 | 2015年7月8日 06:44 |
PHP版本: | 3.0 及以上 |
WordPress版本: | 4.2.2 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
ivycat-ajax-testimonials
directory to your plugins folder.[ic_do_testimonials]
- Adds a rotating testimonial (defaults to three testimonials in ID order).[ic_do_testimonials group='my-created-group']
- Adds testimonials from a custom group using the group's slug, in this case my-created-group
.[ic_do_testimonials quantity='5']
- changes default quantity of testimonials in rotation to 5. Defaults to 3 testimonials.[ic_do_testimonials num_words='X']
- Shows only the first X number of words.[ic_do_testimonials num_words='55' more_tag='Read More...' ]
- When num_words
is specified, the more_tag
lets you specify the text for the "read more" link.[ic_do_testimonials ajax_on='no']
- Turns off automatic AJAX rotation, so a random testimonial will be shown on page load. (AJAX is on by default)[ic_do_testimonials link_testimonials='yes']
- Adds the a link within the <cite>
tag that points to the individual testimonial. Note: Pretty permalinks must be set to allow testimonial linking. If you're using the default (ugly) permalinks, which include a query string, linking won't work. Not sure? If your links look like http://my-amazeballs-domain.com/?p=123
you're not using Pretty Permalinks. (off by default)[ic_do_testimonials all_url='http://www.example.com/testimonials/']
- specify a link to a page that lists all testimonials. The plugin doesn't create this page, so you'll want to add a page and embed the list of testimonials using the example below.[ic_do_testimonials speed='6000']
- change how long each slide is shown.[ic_do_testimonials fade_in='600']
- change timing for each slide to fade in.[ic_do_testimonials fade_out='700']
- change timing for each slide to fade out.[ic_do_testimonials display='list']
- Lists out testimonials, one after the other in a page or post. Note: this shortcode honors the default quantity of posts set under Admin > Settings > Reading, but you can modify the number of displayed testimonials by using quantity='x'
in your shortcode.[ic_do_testimonials display='list' quantity='-1']
- Lists out all testimonials, one after the other in a page or post.testimonials-loop-template.php
file from the plugin's directory to your theme's main directory and you can customize it any way you like. This works best if you're only showing testimonial lists in one place, or your testimonial lists always use the same styles. The plugin looks in your theme's directory for this file before using the file that comes with the plugin.[ic_do_testimonials template='my-custom-template.php']
Note, it's best to start by copying the testimonials-loop-template.php
file to your theme folder, rename, and edit as needed.[ic_do_testimonials group='rubber-chicken' ajax_on='no']
Note: I didn't specify 3 testimonials because that's the default number, but I could have:
[ic_do_testimonials group='rubber-chicken' ajax_on='no' quantity='3']
Or, say you wanted to dynamically rotate between five testimonials in the group called 'licorice', but you only want to show the first 30 words, followed by a link that says "find out more . . ." your shortcode would look like this:
[ic_do_testimonials group='licorice' quantity='5' num_words='30' more_tag='find out more . . .']
Embed a testimonial directly in your theme template
You can drop the following WordPress function in your template files, replacing the [shortcode]
part with your, custom shortcode.
<?php echo do_shortcode("[shortcode]"); ?>
Check the plugin's Installation tab. In an upcoming version, we'll include a page within the WordPress Admin containing a shortcode cheat sheet.
This plugin depends upon your theme's styles and does not contain native styles.
We don't have any built-in styles, so it's not uncommon for things to look a bit awkward in some themes, depending on the theme's CSS. Usually, with some quick poking around, you can change markup, CSS or both so the testimonials will display exactly as you'd like. Screencast coming soon . . .
We recommend using a tool like Firebug or Google Chrome DevTools to identify what styles are used in your site so you can modify the output template or your stylesheet to fit.
Styling Testimonials Embedded Using Shortcodes?
If you're using a shortcode to display testimonials in a list, rather than individually, you can customize the testimonials-loop-template.php
file to suit your site.
Styling Testimonials Embedded Using Widgets?
You may need to a tool like Firebug or Google Chrome DevTools to inspect the markup and CSS in your theme and adjust as needed accordingly.
You might be okay, but if you need style tweaks, you can either:
This is a minimal plugin that prefers function over form. When you have ideas for new features, please post them in this plugin's support forum and we'll respond ASAP. Since this plugin is released at no charge and was originally created to scratch our own itch, we consider all feature requests closely to see if they will save us time and money. If so, we'll usually implement the feature as soon as it makes sense. If you request a feature that we don't need, but think is really cool, we might add it to the roadmap. If you've got an idea for a feature that we wouldn't use, we'll look at creating a hook or filter so you can tie in and implement it yourself. Or, you can fork our GitHub repository, create a patch, and submit a pull request.
If you're a developer, we'd love your help reviewing code, submitting bug reports or patches, testing, and participating over in the GitHub repository. If you're not a developer, but you can follow instructions and take notes, we'd love to have your help beta testing new releases. If you're interested in beta testing, please let us know by posting in the plugin's support forum. GitHub
This plugin respects the Blog pages show at most x posts setting in WordPress under Admin > Settings > Reading.
Of course, you can change this setting in the WordPress Admin, but that will likely affect all posts on your site; not just testimonials. A better way to control number of testimonials shown in a list is to modify your shortcode to add quantity='x'
like so:
[ic_do_testimonials display='list' quantity='7']
- shows 7 posts per page[ic_do_testimonials display='list' quantity='-1']
- shows all postsread_more
tag to more_tag
to avoid conflicts within WordPress.