Sauter la navigation

[Résolu] send current page uri as a variable in a link

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

Add a post attribute to the a link in the URL.

Solution:

In order to do this you must first be creating the link using HTML. Then you can add the respective shortcode that is needed.

For this user's site they wanted to add the current page's url as a parameter.

<a href="externalwebsite.com?redirect-uri=[wpv-post-url]">My Link </a>
This support ticket is created Il y a 4 années et 4 mois. 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)

Marqué : 

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par AlimB3245 Il y a 4 années et 4 mois.

Assisté par: Shane.

Auteur
Publications
#1762411

Tell us what you are trying to do?

I have a link/button which is pointing to an external website.. I need to send the current page URL as a variable in the URL .. lien caché (which is the current page url)

Is there any documentation that you are following? no

Is there a similar example that we can see?

What is the link to your site? fourplusmedia.com

#1762543

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Alim,

Thank you for getting in touch.

In a case like this you will perhaps need to hardcode the link with the URL parameter.

You can try doing it like this.


<a href="externalwebsite.com?redirect-uri=[wpv-post-url]">My Link </a>

https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-url

Please let me know if this helps.
Thanks,
Shane

#1762569

My issue is resolved now. Thank you!

Sorry for the lame question..;-).. I feel stupid for not having realised that.. I was overthinking.. and assumed it would be complicated..;-).. he he..

Thanks again, Shane

Have a nice day..:-)..

Regards,
Alim