Skip Navigation

[Resolved] Condition into view check URL have parameters

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

Problem:
Condition into view check URL have parameters

Solution:
You can get the URL param value using the shortcode: [wpv-search-term]

[wpv-search-term param='your-url-param']

You can find the proposed solution in this case with the following reply:
=> https://toolset.com/forums/topic/condition-into-view-check-url-have-parameters/#post-1966673

Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-214940

This support ticket is created 3 years, 9 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.

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

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 davideE-4 3 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#1966427

Hi,
it is possible have condition to check if URL have any conditions set?
Regards

#1966549

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Could you please share more information about your issue.

What you mean by:
if URL have any conditions set?

Can you please share example so once I review the information you share I will be in better position to guide you in the right direction.

#1966669

Hi Minesh,
I would you like che if the current url have parameters (example hidden link) return value true or false.
I would like a condition that check id URL have any "?" parameters

Regards

#1966673

Minesh
Supporter

Languages: English (English )

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

You can get the URL param value using the shortcode: [wpv-search-term]

For example:

[wpv-search-term param='your-url-param']

More info:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-214940

To check if URL have any params or not you will require to write your custom shortcode that check if there is any URL param available or not and based on that, the shortcode should return the value you want.

More info:
- https://toolset.com/documentation/adding-custom-code/how-to-create-a-custom-shortcode/

#1966901

My issue is resolved now. Thank you!