Custom Login Page

Replacing WordPress Login

TemplateX can replace WordPress wp-login.php screens with theme auth templates.

Enable Custom Auth#

Open TemplateX > Settings > Tweaks.

Enable Auth Screens. Changes save automatically.

When disabled, WordPress uses its default wp-login.php screens even if auth templates exist.

Login Page Forms#

Auth forms created in resources/views/auth are inferred as login-page replacements automatically.

If you write a custom form elsewhere, mark it explicitly:

php
{{ form:login auth="login" login-page redirect="/account/" }}  <form>    {{ form:errors }}    <input name="log" required>    <input name="pwd" type="password" required>    <button>Log in</button>  </form>{{ /form:login }}

Supported auth actions are:

  • login
  • register
  • lost-password
  • reset-password

Layouts#

The Auth templates and layouts panel lets you choose a layout per auth action.

If no auth-specific layout is selected, TemplateX uses the normal default layout.