Skip Navigation

[Resolved] Re-direction link

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

Problem:
How to display link conditionally using views

Solution:
You can use view's [wpv-conditional] shortcode to display conditional output.

You can find proposed solution with the following reply:
=> https://toolset.com/forums/topic/re-direction-link/#post-604259

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

This support ticket is created 6 years, 11 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 6.11 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)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by StephenD4019 6 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#604123

Please see the page - hidden link

You will see the entry under A as:

Advantage – See Hastings Direct

Is there a way that when someone clicks on this link it opens the page for Hastings Direct, listed under H?
I do not want it to open the Advantage page at all.

Thank you.

#604259

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Ok - I've modified the code for your view's loop output as given under:

Basically we have added the conditional output based on the post id.

[wpv-conditional if="( '[wpv-post-id]' ne '472' )"]
<div class="add_space1"></div>
<div>[wpv-post-link]</div>
[/wpv-conditional]

[wpv-conditional if="( '[wpv-post-id]' eq '472' )"]
<div class="add_space1"></div>
<div><a href="<em><u>hidden link</u></em>">Advantage – See Hastings Direct</a></div>
[/wpv-conditional]

More info:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

Could you plesae confirm the solution and mark ticket resolved so I can continue with your other tickets.

#604616

Minesh
Supporter

Languages: English (English )

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

Could you please confirm that this is resolved and so that I will start to work on your other issues.

#604874

Thanks