Hi !
I have created a content template that display the photographer's names.
These photographers names are a CPT which is in relationship wit a project.
I need to display these photographers names on the project page. So I have inserted the Content template "photographers names" inside the project page blocs.
BUT in this Content Template I need to check if the "photo-website" field of the Photographers CPT is empty or not to display the name with/without a link to their website.
How can I make this condition ? How ca I check in my content template if this field is empty or not ?
Thanks for your help.
Hi,
Thank you for contacting us and I'd be happy to assist.
Instead of a content template, you can add a view to show the related 'photographers' posts, inside the template that shows the single 'project' page.
( ref: https://toolset.com/lesson-placement/lesson-placements-1729031-1730449/#displaying-many-related-items )
Inside the loop of this view for the 'photographers' posts, you'll be able to use the 'conditional' block to only show some content, based on the current photographer post's custom field value.
( ref: https://toolset.com/lesson-placement/lesson-placements-1621067-1292451/ )
I hope this helps and please let me know if you need further assistance.
regards,
Waqar
Hi Waqar,
Unfortunately I can't find then way to check my related post field value...
Can you please help ?
I have CPT "Projects" in relationship with another CPT "Photographers".
CPT Photographers have 3 fields : 1st name, name and website url.
I need to check the website URL to know if I display the photographers name as a <p> or a
Thanks for writing back.
To suggest the best way to achieve this, I'll need to see how the involved elements are set up in the admin area.
Can you please share the temporary admin login details, along with the example 'project' post page, where you'd like to show the related 'photographers'?
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.