Skip Navigation

[Closed] Value Check of a field of a CPT in relationship

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.

Our next available supporter will start replying to tickets in about 8.53 hours from now. Thank you for your understanding.

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 3 replies, has 2 voices.

Last updated by Waqar 6 months ago.

Assigned support staff: Waqar.


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.



Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)


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

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

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



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 <a href="website">.

How can I check the website field value ? I need to check if it's empty or not to display. one way or another...



Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

The topic ‘[Closed] Value Check of a field of a CPT in relationship’ is closed to new replies.