latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Redirect user back to Post after Joining.

Home Forums Community Forum Redirect user back to Post after Joining.

Tagged: ,

This topic contains 3 replies, has 2 voices. Last updated by  Eduan 3 years, 10 months ago.

Topic Author Topic
Posted: Sunday Mar 10th, 2013 at 11:25 pm #44236
uywi
Username: thomasjterry

I’m writing in followup to this earlier question.
http://www.s2member.com/forums/topic/keep-user-on-same-page-upon-login/

I asked:

How do I get the user redirected back to the same post after creating a new account?

You replied:

If you use the pro-forms for registration, you can use the success attribute. Dashboard -› s2Member® -› PayPal® Pro Forms -› Custom Return URLs Upon Success

I went to that section, but I couldn’t figure out which attribute to use and how to use it. I’m not well versed in coding. Can you give me a little more detail about this?

What I want is to have a post where part of the content is restricted using shortcodes, and I give the user the option to login or join, and if they join they go to the ProForm, and then after they join, they are automatically logged in and returned to the same post they were on.

Here’s the code for my current free registration form:

[s2Member-Pro-PayPal-Form register="1" level="0" ccaps="" desc="Membership is FREE and never expires!" custom="uywi.org" /]

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Monday Mar 11th, 2013 at 11:43 pm #44310
Eduan
Username: Eduan
Moderator

Hello there,

Well, if after payment/registration you want to send the user to a specific URL you would need to use the success attribute.

Check under Dashboard -› s2Member® -› PayPal® Pro Forms -› Shortcode Attributes (Explained) -› success for more info on this attribute.

Would doing that achieve your desired goal?

Posted: Monday Mar 11th, 2013 at 11:50 pm #44312
uywi
Username: thomasjterry

No, that would not achieve my goal. I’m not trying to send everyone to the same Thank You page upon success. It’s actually just the opposite of that. I’m trying to send them back to whichever post they started on when they encountered the login requirement.

Case:
A user visits Post A, sees teaser content, but the rest of the content is hidden with shortcodes, and they are prompted to login or join if they want to see it. They join, and then I want to send them BACK to Post A.

A different user visits Post B, sees the join/login requirement, joins, and is returned to Post B upon success.

Posted: Wednesday Mar 13th, 2013 at 11:06 pm #44569
Eduan
Username: Eduan
Moderator

I see… It might be possible to attain it, but you would have to use a little bit of PHP magic to make a dynamic URL that does just that…

You would need to install ezPHP (Knowledge Base » ezPHP Plugin for WordPress®) and do something with PHP in that field. Perhaps just grabbing the URL of the current page is enough though. :)

– Eduan

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.