Table of Content
Step 1:
Setup your post-based slider with some default options.
Leave the category/tag selections empty to pull in all Stick Posts. Or select some categories/tags to restrict Sticky Posts to those selections.
Step 2:
Add the following code to your theme’s “functions.php” file.
function slider_sticky_posts($query, $slider_id) {
// only apply the special filter for slider with "x" ID
// http://prntscr.com/r3ovyu
if($slider_id == 4) {
// only include "sticky" posts
$query['post__in'] = get_option( 'sticky_posts' );
}
return $query;
}
add_filter('revslider_get_posts', 'slider_sticky_posts', 10, 2);
Step 3:
Choose which posts will be pulled into the slider
Visit one of your posts, and select “Edit” from the “Publish -> Visibility” section.
Then choose “Stick this post to the front-page” to tag the post as a “Sticky”.
Quick Note
Unless your website is setup to display posts on its homepage, designating a post as a “Sticky” like this will not effect your current homepage content .