Skip Navigation

[Resolved] Conditional show and granfather/father/child relationships

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

Problem:
How to check URL param with [wpv-conditional] shortcode to display conditional content

Solution:
You can use [wpv-conditional] shortcode to dispaly conditional output and to grab the URL param value you should use the shortcode [wpv-search-term].

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/conditional-show-and-granfather-father-child-relationships/#post-617659

Relevant Documentation:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-search-term

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

Last updated by oriolc 6 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#617492

Hi!
I'm trying to create a conditional show view with an link argument in current page.
I create a link with an argument (for example hidden link) and I want to show the view only if someone click this link. If they click another (for example hidden link) or (for example hidden link) show another view, all in the current page.
I saw in: https://toolset.com/documentation/user-guides/passing-arguments-to-views/ that you can control the filters using this method, but I don't know if it is possible conditional show the view with this method too.
Is it possible or I need a parent/child relationship to do it?

#617659

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Yes - you can use [wpv-conditional] shortcode to dispaly conditional output and to grab the URL param value you should use the shortcode [wpv-search-term].

For example:

[wpv-conditional if=" '[wpv-search-term param="available"]' eq '1' "]
display your view 1
[/wpv-conditional]

[wpv-conditional if=" '[wpv-search-term param="available"]' eq '2' "]
display your view 2
[/wpv-conditional]

More info:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-search-term

#618608

Thanks!!!!