Skip Navigation

[Resolved] Display Conditional Child View depending on Custtom Field Value of Parent View

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to display a different child view based on a custom field value.

Solution:

This seems like something that can be achieved by using our conditional shortcodes to check the custom field value.

Take a look at our documentation below on our conditional shortcode and let me know if it helps.
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-types-fields-and-custom-fields/

This support ticket is created 6 years, 2 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by peterS-14 6 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1098620

Hi Toolset Team

Depending on the Value of a Custom Field in the Parent I want to display a different Child View.

Example: The parent has a Custom Field called event type with 2 possible values:

- Concerts
- Classes

If the value is Concerts it should show a child view that lists the musicians
If the Value is classes it should show a child view that lists the teachers

I thought to do this with conditions that then loads the corresponding views (I had this working in Divi)

The main issue for me is that I started to use Elementor which allows me to select a view where I can easy add a child view, but I somehow I got stuck about how I could set up the the condition to show the correct view corresponding to the value in the parent view.

I also wonder if there is maybe a better approach to achieve this

Any hint is very welcome and appreciated 🙂

#1098712

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Peter,

Could you close this ticket here as it is a duplicate of this.
https://toolset.com/forums/topic/display-conditional-child-view-depending-on-custtom-field-value-of-parent-view/

Thanks,
Shane

#1098820

Hi Shane

Thanks for pointing it out - sorry for double submission, but the first try was hanging, so i thought it wouldn't have been sent and tried again