Navigation überspringen

[Gelöst] How to check the URL param value conditionally using Toolset

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
How to check the URL param value conditionally using Toolset

Solution:
You can use the shortcode [wpv-search-term] to check the URL param value conditionally.

You can find the proposed solution in this case with the following reply:
=> https://toolset.com/forums/topic/wpv-conditional-if-check-if-selected-value-not-specified/page/2/#post-2095557

Relevant Documentation:
=> https://toolset.com/documentation/legacy-features/views-plugin/conditional-html-output-in-views/
=> https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-search-term

This support ticket is created vor 3 Jahren, 6 Monaten. 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)

Dieses Thema enthält 20 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von davidm-13 vor 3 Jahren, 6 Monaten.

Assistiert von: Minesh.

Author
Artikel
#2095557

Minesh
Supporter

Sprachen: Englisch (English )

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

You should have clarified that before that we need to perform the search.

Later but sooner its ok and I've solution for you.

I've adjusted the conditional shortcode as given under:

  
[wpv-conditional if="('[wpv-search-term param='wpv-complaint-search-key']' ne '' )"]
  <u>Medicinal Complaint / Use</u>: <b>[get_term_data_custom parameter="wpv-complaint-search-key" taxonomy="complaint-search-key"]</b> <br>
[/wpv-conditional]  

Can you please confirm it works as expected now.

#2095643
not-specified.JPG

Hi Minesh,
Sorry for not clarifying earlier.
If you have access to the site not clear what I need to clarify.
Still not working as expected - see screenshot - "Medical Complaint /Use: not specified" line shouldn't be there.

Thanks

#2095657

Minesh
Supporter

Sprachen: Englisch (English )

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

On what URL exactly you are checking?

Does the URL you have any URL params added? if yes, can you please share that exact URL?

#2095745

Hi Minesh
Here's the url from the above screenshot:
versteckter Link

URIKA!

[wpv-conditional if="('[wpv-search-term param='wpv-complaint-search-key']' ne '0' )"]
  <u>Medicinal Complaint / Use</u>: <b>[get_term_data_custom parameter="wpv-complaint-search-key" taxonomy="complaint-search-key"]</b> <br>
[/wpv-conditional]

Thanks for all your help, much appreciated
#2096317

Minesh
Supporter

Sprachen: Englisch (English )

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

When I checked the following link you shared:
=> versteckter Link

I do not see <u>Medicinal Complaint / Use</u>: not specified is displayed - is is not working correctly?

#2096361

My issue is resolved now. Thank you!