Skip Navigation

[Resolved] pad-last doesn't seem to get used

This support ticket is created 5 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 5 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1618779

Tell us what you are trying to do?
Display a masonry gallery via a shortcode with this code:

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
[dss_masonry_gallery _builder_version='4.4.5' images='<wpv-loop pad="true">[wpv-item index=other][wpv-post-featured-image size="full" output="id"],[wpv-item index=pad-last][wpv-post-featured-image size="full" output="id"]</wpv-loop>']
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-layout-end]

But the output of the loop always ends with a comma, which it shouldn't if pad-last gets used. What is wrong here?

Thanks!

What is the link to your site?
sturmstudios.at

#1619609

Hi,

Thank you for contacting us and I'd be happy to assist.

Since you'd like to target the last item in the loop, "last" instead of "pad-last" should be used.

The "pad-last" option is needed when the output with a specific number of rows/columns are involved:
https://toolset.com/documentation/user-guides/views/digging-into-view-outputs/#loop-shortcode-wpv-item-and-the-index-parameter

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar