• Resolved Dave

    (@deeve007)


    When “Enable private site” is checked, is there a hook or easy way to redirect a non-logged in user to a custom page or URL rather than the login page?

    I know I can add PHP code to my theme header file to do this, just through I’d check if the plugin had a hook or feature at all?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Caseproof

    (@caseproof)

    Hi Dave,

    The “Private Site” feature uses the auth_redirect() function to perform the redirect. That function is filterable itself, but we don’t have a custom filter for this.

    Hi @caseproof – I have this same need – I wonder if you might consider adding a simple ‘redirect to other URL’ instead of to the wp-login page in a future update?

    We use this plugin to lock down a site to only employees as our team portal, and absolutely do not want the wp-login page accessible (it gets too many bot hits trying to hack in), so we use another plugin (Block WP-Login) to create a custom login URL that we give only to employees authorized to login.

    So when someone tries to access our website, I don’t want them directed to a Login Page, I want them to go to a Page that says something like “Sorry you must be authorized – please see your Supervisor to get login credentials”. If they are logged in, they’ll get the Portal home page with menu options.

    Without the ability to redirect all non-logged-in users, I have to triple-check to be sure all newly created posts and pages are limited by role…..it would be nice to check 1 box in the Plugin’s Settings and enter a URL.

    Thank you in advance for considering it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Private site redirect to custom page/URL?’ is closed to new replies.