🔴 Advanced
⏱️ 30 minutes
⏱️ 30 minutes
Summary
Override plugin templates to create fully custom form designs while maintaining update compatibility.
Template Structure
Plugin Templates Location:
/wp-content/plugins/attributes-user-access/templates/
Your Theme Override Location:
/wp-content/themes/your-theme/attributes-user-access/
Available Templates
login-form.php– Login form templateregistration-form.php– Registration formlost-password-form.php– Password resetprofile-form.php– User profile editormessages.php– Error/success messages
Step 1: Copy Template to Theme
- Create folder:
/your-theme/attributes-user-access/ - Copy desired template from plugin to theme folder
- Maintain same filename for override to work
Step 2: Customize Template
<?php
/**
* Custom Login Form Template
* Override: templates/login-form.php
*/
?>
<div class="custom-login-wrapper">
<h2><?php echo $args['title']; ?></h2>
<form method="post" class="custom-login-form">
<!-- Your custom HTML here -->
<?php wp_nonce_field('attrua_login'); ?>
</form>
</div>
Available Template Variables
| Variable | Description |
|---|---|
| $args | Shortcode attributes array |
| $redirect_to | Redirect URL after login |
| $errors | WP_Error object with form errors |
Best Practices
- ✅ Keep template structure similar to original
- ✅ Include all security nonces and checks
- ✅ Test thoroughly after customization
- ✅ Document your changes for future reference