[Support request] Carousel auto slide

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Carousel auto slide

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27506
    George
    Participant

    Hello,
    I’m using wp show posts pro and I would like to make a carousel that automatically slides every X seconds.
    Is there a way to do this? I saw this post https://wpshowposts.com/support/topic/change-arrows-dots-and-autoplay-settings-in-specific-wpsp-list/
    but it’s confusing to me. Can you please provide a snippet or something (and where to place it) to get this done until you add it as a feature in your plugin?
    Thank you.

    #27508
    George
    Participant

    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 🙂

    #27535
    elvin
    Moderator

    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. 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.