• Resolved betauser01

    (@betauser01)


    Hello!

    I have a real estate website and I am interested in configuring your plugin to restrict user access to single property listings.

    More specifically, I want the following:

    1. logged out/unregistered users to be able to conduct a property search and view the corresponding property archives (search results)
    3. BUT to be redirected to login/register page if they click to view an individual property listing (single property) from the archives.
    4. AND finally, to redirect them to referring page after a successful login/registration (the property archive page from #1 with search results), instead of the homepage (as it is now by default), so they do not have to restart their search.

    My questions are:

    1. How can I differentiate the restriction for single property from property archives. Currently, I am either able to restrict access to both single property listings and property archives or none of the two.

    2. How can I change the default redirect url after login/registration from the default homepage to the referring search results page (property archive)

    Many thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter betauser01

    (@betauser01)

    For question #2 I understand I can use the “Login & Back” option, but I want to change the default login page from /wp-login.php/ to /login-register/, because this is the page for users.

    Plugin Support mark l chaves

    (@mlchaves)

    Hey @betauser01,

    Sorry for the delay. We’ll have a look at your questions today and get back to you as soon as possible.

    Thanks for your patience 🙂

    Plugin Support mark l chaves

    (@mlchaves)

    Hey @betauser01,

    With version 1.1.9, the redirect protection default behavior allows post category archive pages to include restricted posts in the listing. But, you’ll see the default message, and when you click on a restricted post teaser, you’ll be redirected to the default WordPress login page.

    Here’s a demo of that.

    https://share.wppopupmaker.com/YEurL65X

    Now with search results pages, the redirect protection will redirect to the WP login page if all search results returned on the results page are restricted. If there’s a mix of restricted and non-restricted results you should get the same scenario we described earlier.

    To get around that redirect case, you can change the protection rule from Redirect to Custom Message. Then, you can include a login link inside your default message. That might not be exactly what you want, but that will be the closest solution available.

    For question #2, Content Control uses WordPress’s built-in login pages. Here’s sample code that you can customize to work for you.

    https://gist.github.com/marklchaves/86f23654c0f4eb7de2223c85e1da31ec

    We hope that helps. Let us know if we missed anything or if you need anything else.

    Have a great day 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Restrict access to individual property listings, but not property archives’ is closed to new replies.