Simple Membership Plugin › Forums › Simple Membership Plugin › Custom message for 'Restricted Post (Not Logged-in)' and Redirection addin
Tagged: addin, custom message, redirect
This topic contains 7 replies, has 5 voices, and was last updated by mbrsolution 4 months, 2 weeks ago.
-
AuthorPosts
-
March 7, 2018 at 11:14 am #13600
I used your custom message add on to change the above message, but now find that having done this I can no longer use the after login redirect addin to ‘Enable Redirection to the Last Page’. Why are these two incompatible? And is there anything I can do about it? I cant find a way of restoring the original message so that I can use the redirection.
March 8, 2018 at 3:26 am #13605Hi, have you tried deleted the custom message addon? Then installing a fresh copy? Let me know how you go.
In regards to your other question please read below.
(The following was quoted by admin in the forum.)
The login redirect addon LOOKS for the special login link that the core plugin creates. It then replaces that login link with an extra parameter. If you use the custom messages addon to override the standard protection message of the plugin then the login addon can’t add the extra parameter. This is one of those features where you need to pick one (You can’t get both).
Kind regards
March 8, 2018 at 9:58 am #13609Thanks. I think I will stick with what I have, as custom messages are probably of more value to me that the redirect. Cheers for your response though.
March 8, 2018 at 10:16 am #13610Sure no problem. I will mark this support thread as resolved.
Enjoy the plugin.
November 25, 2018 at 9:08 pm #16855I understand the technical reasons for this:
The login redirect addon LOOKS for the special login link that the core plugin creates. It then replaces that login link with an extra parameter. If you use the custom messages addon to override the standard protection message of the plugin then the login addon can’t add the extra parameter.
But there must also be a solution. Perhaps a macro for the custom messages plugin that allows the link to be extended with the
?swpm_redirect_to=
parameter? Something like<a href=/login-page?swpm_redirect_to=%%MACRO%%>
…?November 26, 2018 at 5:07 am #16856What you can do is use the filter (triggered by the core plugin) directly. Then customize the code according to however you need it.
The filter hooks in question are the following:
swpm_restricted_post_msg
swpm_not_logged_in_post_msg
September 4, 2020 at 2:47 am #20838Hello,
These post are now 2 years old. Has anything changed?
I have both the redirection addon and the custom message addon. After reading the documentations and the forum, I am still a little confused. Please bare with me as I am not an expert and new to wordpress.
I understand that the custom message overrides the redirection but there is this message in the documents:
“When this feature is enabled, if you click on the “Login” link of a protected post or page, it will send you to the login page with “swpm_redirect_to” query parameter in the URL (meaning this feature is active).” I don’t quite understand what this means, but I am under the impression that I can add (/?swpm_redirect_to=) after my domain address in one of the custom message fields and it will operate like the redirection addon. I tried that and it didn’t work.Currently I have the following in the field:
<div class=”swpm-custom-restricted-post-msg”>This is my custom message. Please LOGIN. Not a member custom message JOIN US.</div>
Could you help me add the redirect parameter to the URL?
September 4, 2020 at 5:50 am #20841 -
AuthorPosts
You must be logged in to reply to this topic.