mbrsolution on "[Plugin: Simple Membership] Private prevent access to users logged page, redirect public area"

ساخت وبلاگ

Hi, I'm doing a site where there is a private area and another public. If accessed directly via the URL of a protected page you are part of the content that is visible, which is done with a page builder. Anyway, I do not want you can see anything on that page, or menu (that I solved with another plugin) or sidebar ...
Then I thought to use your car code redirect any non-members https://simple-membership-plugin.com/auto-redirect-non-logged-in-users-protect-whole-site/
that does exactly what I want, but the problem is that then you can not access the public part.
Could you help me with a code that allows access to unregistered users all public pages and when access to a private will try to do the redirect?
This would be great for me.
Thank you very much, great job.

https://wordpress.org/plugins/simple-membership/

Hi, let me see if I understand what you are trying to achieve. You would like to redirect a person that is not a member when they land in the protected page to a different URL "page"? Is this correct?

Yes that's right

Hola mbrsolution, he visto que eres español al pinchar el enlace que lleva a tu blog. Yo también soy española y no me entiendo muy bien con el inglés, por eso me explico tan mal.
Solo quería saludarte y darte las gracias por tu interés.

Hello that is great to know that you are also Spanish :) This is an English forum that is why I never reply in Spanish. It is part of the WordPress forum rules to only reply in English.

If you need to contact me simply click on my name link here and send me a message through my contact form. It will be my pleasure to assist you further in Spanish ;)

Regards

Sorry, I had not thought of.
Anyway not intended to answer me in Spanish, I just wanted to apologize for the mistakes he will be in my explanation in English.
Thank you

At the present you can set up the following scenario. Lets say that a visitor lands on a protected page or post. They are then able to click on the Join Us link to register. Once they register then you can redirect them to a different URL. Is that what you would like to do?

No, it's not exactly that.
When a visitor lands on a page protected, you can not see the content of the page, but see the menu, the sidebar, etc. I need not see absolutely nothing of the private party, so I want to redirect to another site without having any access

Hi, unfortunately the plugin does not protect the menu and sidebars in a website. This plugin only protects the content of posts and pages.

Let me know if you need more information.

Kind regards

Hello,
Indeed the plugin does not work for that, but hoped to solve it with some function or something.
Thank you very much for your time.
Kind regards

Hi, you might try to set the protected pages and post with a custom template. That way when they land on the protected pages and post they will only see what ever you add in the custom template. In this template you could easily add a link to another URL.

Yeah, that's a good idea, but I do not know how to put the condition if the user is logged in or not.
I really appreciate your help.

Hi, check the following documentation. I am sure you will find some code in this page that will meet your needs.

Kind regards

Thank you very much, I got the result I wanted, but I finally used this code:
if (! is_user_logged_in ())
wp_redirect ('http://example.com');
It was a pleasure to have your help
Kind regards

I am happy to hear that you found a solution to your problem ;)

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 44 تاريخ : سه شنبه 24 فروردين 1395 ساعت: 7:17