We're merging with GenerateBlocks! Learn more here.

[Support request] End the carousel loop with ‘More…’

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support End the carousel loop with ‘More…’

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #19733

    I have 100s of restaurants and I have a carousel showing 12 of them (4 at a time). The problem is the carousel continues in a loop. Is there a way to stop at the final restaurant (12th in my case) and have a graphic or button saying something like ‘More Restaurants’ that will link them to my archive Restaurant Page?


    Hi Gary,

    We can stop the loop by adding this PHP snippet.

    add_filter( 'wpsp_carousel_args', function( $args ) {
        $args['infinite'] = false;
        return $args;
    } );

    I’ve tested this on my end to be sure it won’t cause errors. Let us know if it works for you.:)


    Hi Elevin,

    That worked great in terms of stopping the loop. Thank you very much! But is there anyway of adding a badge (or any kind of small block) at the end of the carousel where I can add a link such as ‘More restaurants…’, ‘More Cafes…’, etc.

    Thanks, Gary


    As of right now it’s not really possible unless you insert something using javascript.

    The plugin could use a new hook before the closing wrapper – that way we could hook something in using PHP. We’re currently in alpha testing for 1.2.0, so I should be able to get the hook added in alpha.3.

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