MonsterTools includes a complete user authentication system that allows you to create member-only areas, protect your tools, and manage user accounts seamlessly. The plugin automatically creates all necessary pages and provides flexible shortcodes for displaying login, registration, and password reset forms.
Auto-Created Authentication Pages
Upon activation, MonsterTools automatically generates the following essential pages:
Login Page - User authentication
Registration Page - New account creation
Forgot Password Page - Password reset requests
Reset Password Page - Set new password
My Account Page - User dashboard and profile management
These pages are ready to use immediately and contain the appropriate shortcodes. You can find them in WordPress Admin > Pages and customize them as needed.
Authentication Shortcodes Reference
1. Login Form - [monstertools_login]
Displays a user login form with email/username and password fields.
Attributes:
redirect_to- URL to redirect after login (default: home page)
Examples:
[monstertools_login] [monstertools_login redirect_to="/my-account/"]
2. Registration Form - [monstertools_register]
Displays a user registration form with email and password fields.
Attributes:
redirect_to- URL to redirect after registration (default: home page)
Examples:
[monstertools_register] [monstertools_register redirect_to="/pricing/"]
3. Forgot Password - [monstertools_forgot]
Displays a form to request a password reset link via email.
Attributes:
redirect_to- URL to redirect after request (default: login page)
Examples:
[monstertools_forgot] [monstertools_forgot redirect_to="/custom-login/"]
4. Reset Password - [monstertools_reset]
Displays a form to set a new password (requires reset key and login parameters).
No attributes - Automatically handles reset keys from email links.
Example:
[monstertools_reset]
Automatic User Redirection
The system includes smart redirection logic:
Logged-in users are automatically redirected from login/register pages to their account page
Guest users are redirected from account pages to the login page
Custom redirects can be set via the
redirect_toparameter or URL parameter
Customizing Authentication Templates
You can completely customize the appearance of all authentication forms by overriding the plugin's template files in your theme or child theme.
Template Override Structure
Create this directory structure in your theme:
your-theme/
└── monster-tools/
└── auth/
├── login.php
├── register.php
├── forgot.php
└── reset.phpAvailable Template Files to Override
auth/login.php- Login form templateauth/register.php- Registration form templateauth/forgot.php- Forgot password form templateauth/reset.php- Password reset form templatenotices/messages.php- System message displays
Step-by-Step Template Override Guide
1. Locate the Original Template Files
First, find the template you want to customize in the plugin directory:wp-content/plugins/monstertools/templates/auth/
2. Create Theme Directory Structure
In your active theme, create the nested directory:
/wp-content/themes/your-theme/monster-tools/auth/
3. Copy and Customize
Copy the template file from the plugin to your theme directory and modify it:
Example: Customizing login.php
<?php
/**
* Custom Login Template for MonsterTools
*
* Override path: your-theme/monster-tools/auth/login.php
*/
?>
<div class="custom-login-wrapper">
<h2>Welcome Back!</h2>
<?php monstertools_show_messages(); ?>
<form method="post" action="<?php echo esc_url($action_url); ?>" class="custom-login-form">
<input type="hidden" name="action" value="<?php echo esc_attr($action); ?>">
<input type="hidden" name="redirect_to" value="<?php echo esc_url($redirect_to); ?>">
<?php wp_nonce_field($nonce_name, 'nonce'); ?>
<div class="form-group">
<label for="user_login">Email or Username</label>
<input type="text" name="user_login" id="user_login"
value="<?php echo esc_attr(monstertools_old('user_login', $old_key)); ?>"
required class="form-control">
</div>
<div class="form-group">
<label for="user_password">Password</label>
<input type="password" name="user_password" id="user_password" required class="form-control">
</div>
<button type="submit" class="btn btn-primary">Sign In</button>
<div class="auth-links">
<a href="<?php echo esc_url($register_url); ?>">Create Account</a>
<a href="<?php echo esc_url($forgot_url); ?>">Forgot Password?</a>
</div>
</form>
</div>Available Template Variables
Each template provides specific variables you can use:
Login Template Variables:
$action_url- Form submission URL$nonce_name- Security nonce name$action- Form action identifier$redirect_to- Redirect URL after login$old_key- Key for sticky form data$register_url- Registration page URL$forgot_url- Forgot password page URL
Registration Template Variables:
$action_url,$nonce_name,$action,$redirect_to,$old_key$login_url- Login page URL
Utility Functions:
monstertools_show_messages()- Display system messagesmonstertools_old($field, $key)- Get sticky form data
Advanced Customization Examples
1. Custom Styling with CSS Classes
<div class="my-custom-auth-form">
<!-- Your custom form markup -->
</div>2. Adding Custom Fields
// In your custom register.php
<div class="form-group">
<label for="phone_number">Phone Number (Optional)</label>
<input type="tel" name="phone_number" id="phone_number"
value="<?php echo esc_attr(monstertools_old('phone_number', $old_key)); ?>"
class="form-control">
</div>3. Custom Redirect Logic
// Force specific redirect for certain user roles
$redirect_to = apply_filters('monstertools_custom_redirect', $redirect_to, wp_get_current_user());Best Practices for Template Overrides
Always keep backups of your custom templates
Test thoroughly after plugin updates
Use child themes to preserve customizations during parent theme updates
Follow the original template structure for easier maintenance
Document your customizations for future reference
Troubleshooting Template Overrides
Override not working? Verify the directory path matches exactly:
your-theme/monster-tools/auth/White screen? Check for PHP errors in your custom template
Form not submitting? Ensure you include all hidden fields and nonce verification
Styling issues? Make sure your CSS properly targets the new HTML structure
By using these template overrides, you can completely customize the authentication experience to match your site's design while maintaining all the powerful functionality of MonsterTools' membership system.