Template Customization

🔴 Advanced
⏱️ 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 template
  • registration-form.php – Registration form
  • lost-password-form.php – Password reset
  • profile-form.php – User profile editor
  • messages.php – Error/success messages

Step 1: Copy Template to Theme

  1. Create folder: /your-theme/attributes-user-access/
  2. Copy desired template from plugin to theme folder
  3. 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

Review My Order

0

Subtotal