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