Skip Navigation

[Resolved] Photo gallery doesn't show in layouts

This support ticket is created 6 years, 9 months 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by marcov-3 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#628231

I am trying to get a photo gallery in a CPT. I have build a layout that is assigned to the CPT. When I create a photo gallery like your article https://toolset.com/2017/10/adding-a-gallery-of-images-for-custom-posts/ it won't show.

<div id="fotogalerij">[wpv-for-each field="galerij-foto-s"]<a href="[types field='galerij-foto-s' size='full' url='true' separator=', '][/types]">[types field='galerij-foto-s' alt='%%ALT%%' title='%%TITLE%%' size='medium' align='left' resize='proportional' separator=', '][/types]</a>[/wpv-for-each]</div>

Without the the href it will work. Is there something I do wrong in the code? Or can't it be done in the Layouts plugin?

Cheers

MArco

#628361

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Could you please try to use following code: You missed the "wpcf-" prefix with field name with [wpv-for-each] loop and I also removed the separator attribute as its not needed.

<div id="fotogalerij">
[wpv-for-each field="wpcf-galerij-foto-s"]
<a href="[types field='galerij-foto-s' size='full' url='true'][/types]">[types field='galerij-foto-s' alt='%%ALT%%' title='%%TITLE%%' size='medium' align='left' resize='proportional'][/types]</a>
[/wpv-for-each]
</div>
#628366

Thanks Minesh!