Global FPS options
Global FPS options are configured in WP Admin – Appearance – Premium Featured Posts Slider (screenshot).
Option name | Description | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Width | Slider container width – this option has to be configured. Set the value according to your theme layout. Any CSS parsable value is accepted. We don’t recommend using “100%”. | 600px | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Slider Content | You can feature content that’s been manually selected or use the latest content. This option has full support for custom post types. | latest posts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Number of Slides | Number of posts shown in slider. If the number of “featured” posts is greater than “number of slides” the later will take precedence. | 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Thumbnail Size | List of thumbnail sizes your theme supports. Select the size that best fits your site’s layout and selected FPS layout. FPS registers it’s own additional thumbnail size which can be customized. Thumbnail size can be chosen on a per-post basis while editing individual posts. | medium | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Short Content Length | The length content is truncated to when {content-short} variable is used. Default: 250. | 250 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Layout | FPS comes with 6 predefined layouts:
If none fit your needs you can define your own using variables described later in this doc. |
layout 2 |
Option name | Description | Default |
Width | Slider container width – this option has to be configured. Set the value according to your theme layout. Any CSS parsable value is accepted. We don’t recommend using “100%”. | 600px |
Slider Content | You can feature content that’s been manually selected or use the latest content. This option has full support for custom post types and custom taxonomies. | latest posts |
Number of Slides | Number of posts shown in slider. If the number of “featured” posts is greater than “number of slides” the later will take precedence. | 5 |
Thumbnail Size | List of thumbnail sizes your theme supports. Select the size that best fits your site’s layout and selected FPS layout. FPS registers it’s own additional thumbnail size which can be customized. Thumbnail size can be chosen on a per-post basis while editing individual posts. Once the size is changed you have to re-build or re-upload the images. We suggest using Image Sizes Manager. |
medium |
Layout | FPS comes with 6 predefined layouts:
If none fit your needs you can define your own using variables described later in this doc. |
layout 2 |
Auto Generate Previous and Next Buttons | If checked previous and next buttons will be placed on left and right edges of the slider. | enabled |
Auto Generate Pagination Buttons | Choose from two pagination types below the slider: circles and thumbnails; or disable pagination. | circles |
Autoplay | Time between each automatic slide switch. | 5 seconds |
Transition Effect | Effect used for transitioning between slides – slide or fade. | slide |
Transition Effect Speed | Duration of transition effect/animation in milliseconds. | 350 milliseconds |
Stop on Hover | If checked autoplay will be stopped once user hovers over the slider. | enabled |
Randomize | Randomize slides order. By default they are orderd by publishing date, descending. | disabled |
Include CSS | If you wrote your own CSS for slides or copy/pasted our CSS code into some other file then disable this option, otherwise leave it enabled. | enabled |
Include jQuery | If your theme doesn’t already have jQuery included enable this option to have FPS include it. | disabled |
Include Slides JS | If your theme already has Slides JS included uncheck this option. | enabled |
Shortcode Name | Write only the shortcode name, without brackets. If the shortcode name you want is already taken you’ll be notified after saving. | fps |
Additional Image Size | Width, height and cropping option for FPS custom image size. Please note: changes to image size are not “retroactive” meaning they will only affect newly uploaded images. Use Image Sizes Manager to re-build images. | 330x330px, cropped |
Pagination Thumbnail Image Size | Width and height option for FPS navigation thumbnail image size. Please note: changes to image size are not “retroactive” meaning they will only affect newly uploaded images. Use Image Sizes Manager to re-build images. | 50x50px |
Show Slider | If you want FPS shown only on certain pages but you placed FPS code in ie header.php set this option to enable conditional display on selected pages. | always display FPS |
Per-post FPS options
Per-post (page / custom post type) options (screenshot) are configured while editing and creating new content. Three variables can be set:
- featured – yes / no
- layout – use FPS globally configured layout, one of 6 predefined or the custom one
- thumbnail – use FPS globally configured thumbnail, or any other size available in your theme
Selecting featured content
In post / page / custom post type list (table) you’ll see a new column “Featured” (screenshot). By checking / unckecking the checkbox for a selected post you’ll mark it as featured / not featured.
List of variables available for use in custom layout code
When writing custom layout code you can use the following variables. The code itself is plain HTML. Please note that the code you enter is the code for a single slide not the whole slider. To get some ideas how to write code look at the code of 6 predefined layouts.
- {id} – post ID; ie: 34
- {permalink} – post permalink URL; ie: http://www.myweb.com/my-pos/
- {title} – post title; ie: My Nice Title
- {excerpt} – post excerpt with “the_excerpt” filter applied. If there\’s no excerpt an empty string is returned.
- {content-full} – complete post content with “the_content” filter applied.
- {content} – post content before the “<!–more–>” separator with “the_content” filter applied.
- {content-short} – complete post content with “the_content” filter applied truncated to the length set with the “Short Content Length” option.
- {author} – post author “display name”; ie: John Doe
- {author-link} – URL to author\’s archive page; ie: http://www.myweb.com/author/john/
- {date} – post “published” date. Formatted using “date format” from Options – General; ie: 2011/02/22
- {time} – post “published” time. Formatted using “time format” from Options – General; ie: 8:22 am
- {comments-count} – total comments count; ie: 25
- {categories} – comma separated list of category links
- {tags} – comma separated list of tag links
- {thumbnail} – thumbnail <IMG> HTML element complete with src, width, height and default WP CSS classes.
- {thumbnail-src} – thumbnail file URL
- {thumbnail-width} – thumbnail width in pixels; ie: 330.
- {thumbnail-height} – thumbnail height in pixels; ie: 330.
- {slider-width} – slider width you entered in FPS options; ie: 700px.
Using theme PHP functions
FPS features two theme functions:
- the_featured_posts_slider() – echoes complete slider content
- get_the_featured_posts_slider() – returns complete slider content in a string
Both functions have no parameters so in most cases to implement FPS in your theme use:
<?php the_featured_posts_slider(); ?>
Using the shortcode
FPS shortcode ([fps]) is basically just a wrapper for the_featured_posts_slider() function. You can use it in text widgets to enable FPS. If you have a widget area in site’s header implementing FPS is merely a matter of using the shortcode in a text widget.
If your site’s front-page is a static page you can of course put the shortcode in that page.