Problem:
Output current page URL in a link, for example:
<a href="/wp-login.php?redirect_to=php echo $_SERVER['REQUEST_URI'];" class="simplemodal-login">Log In</a>
>
Solution:
You can not use PHP codes in the post content directly.
I assume you are going to pass parameter of current page URL, and current page is a wordpress post/page, you can retrieve the current post/page URL value with Views shortcode [wpv-post-url], so you can use it in your code, like this:
<a href="/wp-login.php?redirect_to=[wpv-post-url]" class="simplemodal-login">Log In</a>
Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-url
Outputs the URL to the current post.
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 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9: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/Hong_Kong (GMT+08:00)
This topic contains 3 replies, has 2 voices.
Last updated by 6 years, 7 months ago.
Assisted by: Luo Yang.