Hi there,
Here’s an example, Let me explain the code:
add_filter( 'wpsp_carousel_args', function( $args , $settings ) {
if ( 399 === (int) $settings['list_id'] ) {
$args['autoplay'] = true;
$args['autoplaySpeed'] = 3000;
}
return $args;
}, 10, 2 );
First off, this is a PHP snippet. PHP snippets are added on your child theme’s functions.php or through a plugin called Code Snippets plugin.
Now for the code itself:
In the line if ( 399 === (int) $settings['list_id'] )
, you must replace 399
with the WPSP list id you intend to apply the automatic slide setting.
$args['autoplay'] = true;
simply means to enable autoplay or automatic sliding. $args['autoplaySpeed'] = 3000;
is the waiting time before it slides to the next item. 3000 is in milliseconds. Adjust this to your preference.
In addition, i would like to place advertisement banners that links to external websites rather than posts. Whats the best way to achieve this please?
Thank you again 🙂
WP Show Posts isn’t made for that. While you can try inserting the ads on a wpsp_after_content, I’m not sure it will work.
Try looking for another plugin to make carousel for ads. 🙂