the answer for all question about Oxygen Builder plugin and WordPress

Calling all PHP wizards!


Calling all PHP wizards!
I need to restrict access to my entire WP site. I know there are a few plugin solutions out there but would rather not go down that route as I want full control over the login page content, style etc.
I have stumbled across a pretty neat snippet that forces login via wp-login.php page, but I would like to amend this so that logged out users are redirected to a custom URL where I can place the Oxy login form, say /login

Here is the snippet – any takers?



Source

3 Comments
  1. Calvin Akn says

    This snippet does not restrict access to wp-login.php.
    I could hammer away with POST request to wp-login.php and this would not do a thing

  2. Calvin Akn says

    Rereading and seeing thats not quite what you want. Just replace wp_safe_redirect(wp_login_url()) with wp_safe_redirect(/mycustompage)

  3. Konstantin Fedorov says

    You may restrict it using web server like https://www.web2generators.com/apache-tools/htpasswd-generator

Leave A Reply

Your email address will not be published.