Welcome! To use this support forum, please Login or Join Today!

   

Add slider in Skeleton

{name}
Rank

Total Posts: 17

Joined 2014-05-01

PM

 

I want to add a slider widget (html / text widget) to the right sidebar. Can you kindly recommend some code for this?

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Hi, there’s no built-in slider for Skeleton, but there are a plethora of plugins out there. Not sure which one I’d recommend for a slider in the sidebar being in such a small area, especially in a responsive manner.

If it were me, I’d enqueue the jQuery Cycle plugin and just use the markup from any of their examples in your widget. To enqueue Cycle, just add this to your functions.php:

function skeleton_cycle() {
 wp_enqueue_script( 'cycle', '//cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20140216/jquery.cycle2.min.js', 'jquery', '2.0', true );
}
add_action('wp_enqueue_scripts','skeleton_cycle');
{name}
Rank

Total Posts: 17

Joined 2014-05-01

PM

 

Thanks Casey.