Skip Navigation

[Resolved] Test if there is a relationship

This support ticket is created 4 years, 10 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 4 replies, has 2 voices.

Last updated by Minesh 4 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1275647

I've created relationships between services and projects and show 3 related projects on Service pages. That section of the page has a darker background and bold header. If there is no record I don't want to make the header or grey section. Is there a conditional test to check if the service has related projects? Is it just a matter of seeing if an entry exists in the intermediary table? Thanks? Jim

#1275669

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please tell me where you added the darker background and bold header - is it within the view's loop editor?

What if you try to follow the method which is described here:
=> https://toolset.com/forums/topic/conditional-to-test-if-post-is-connected-via-relationship-or-similar-effect/#post-1206211

#1275859

Hi, I am using a layout that calls different views as needed.

Here is an example. I would like to not display the news header if there are no news items attached...(not a grey background there.)

hidden link

#1276321

Minesh
Supporter

Languages: English (English )

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

Do you mean News and Ideas section or the top banner? Can you please share screenshot of the section you want to hide?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1284715

Minesh
Supporter

Languages: English (English )

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

The access details you shared with me is not working at this end. Can you please send me working access details.

I have set the next reply to private which means only you and I have access to it.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.