Shortcode Usage
The Advanced Username Manager plugin provides a simple shortcode that you can add to any page or post to display a username change form. This gives you complete flexibility in where and how users can change their usernames.
The Username Manager Shortcode
The shortcode is:
[username_manager]
This shortcode displays a complete username change form with:
- Current username field (read-only)
- New username input field
- Real-time username availability check
- Username suggestions
- Save Changes button
Adding the Shortcode to a Page
Step 1: Create or Edit a Page
- Log in to your WordPress admin dashboard
- Navigate to Pages → Add New (or edit an existing page)
- Give your page a title (e.g., “Change Username” or “Account Settings”)

Create a new page for the username change form
Step 2: Add the Shortcode
For Block Editor (Gutenberg):
- Click the + button to add a new block
- Search for “Shortcode” block
- Click the Shortcode block to add it
- Type
[username_manager]in the shortcode field

Add the shortcode using the Shortcode block
For Classic Editor:
- Place your cursor where you want the form to appear
- Type
[username_manager]directly in the editor - The shortcode will appear in square brackets

Add the shortcode in the Classic Editor
Step 3: Publish the Page
- Click Publish (or Update if editing an existing page)
- View the page on the frontend to see the form

The username change form displays on the frontend
What the Form Looks Like
When users visit a page with the [username_manager] shortcode, they will see:
For Logged-In Users with Permission

The complete username change form for authorized users
The form includes:
- Current Username – Displays the user’s current login username (read-only field)
- New Username – Input field where users type their desired new username
- Real-Time Validation – Instant feedback as users type
- Username Suggestions – Alternative options if the username is taken
- Save Changes Button – Submit the username change
For Logged-Out Users
If a user is not logged in, they see a message:
“To change your username, please log in first.”

Message shown to logged-out users
For Users Without Permission
If a logged-in user doesn’t have the required role, they see:
“You do not have permission to change usernames. Please contact the administrator for assistance.”

Message shown to users without proper permissions
When Feature is Disabled
If username changes are disabled in settings, users see:
“Username changes are temporarily disabled. Please try again later or contact support for assistance.”
Using the Form: Step-by-Step
Step 1: Enter New Username
- The Current Username field shows your existing username (cannot be edited)
- Click in the New Username field
- Start typing your desired new username

Type your desired username in the New Username field
Step 2: Check Availability
As you type, the plugin automatically checks if the username is available:
If Available:

Green checkmark indicates the username is available
You’ll see: “Great! This username is available.”
If Taken:

Red X indicates the username is already in use
You’ll see: “Sorry, this username is already in use. You can select from the following suggestions.”
The form will display alternative username suggestions you can choose from.
Step 3: Validate Username Requirements
The form checks your username against the configured rules:
- Minimum Length: Username must meet the minimum character requirement
- Maximum Length: Username cannot exceed the maximum character limit
- Valid Characters: Only letters, numbers, and underscores allowed
- Not Same: New username must be different from current username
Validation Errors:

Error messages guide users to valid usernames
Examples:
- “The username must be at least 5 characters long.”
- “The username must not exceed 12 characters.”
- “Please enter a different username!”
Step 4: Save Changes
- Once you enter a valid, available username, the Save Changes button becomes enabled
- Click Save Changes
- Wait for the form to process (a loading indicator may appear)

Click Save Changes to update your username
Step 5: Success
After successful username change:

Success message confirms the username change
You’ll see: “Username has been changed successfully!”
What Happens Next:
- Email Notification – You receive a confirmation email
- Auto Re-login – You remain logged in with your new username
- Cooldown Activated – The rate limit timer starts
- Page Refresh – For BuddyPress users, the page redirects to the new profile URL
Email Notification
After changing your username, you’ll receive an email like this:
Subject: “{Site Name} Your Username Has Been Successfully Updated !”
Email Content:
Hello John, We’re writing to let you know that your username on Example Site has been successfully updated. Your new username is: johndoe2026 If you did not request this change, please contact our support team immediately to secure your account. Thank you for being part of Example Site! Best regards, The Example Site Team
Rate Limiting (Cooldown Period)
If you try to change your username again before the cooldown period expires, you’ll see a message:

Rate limit message shows when the next change is allowed
“You have already updated your username. You can change it again after February 22, 2026.”
The cooldown period is set by the site administrator (7, 15, or 30 days).
Adding the Shortcode to Widgets
You can also add the shortcode to widget areas:
For Block-Based Widgets (WordPress 5.8+):
- Go to Appearance → Widgets
- Click + to add a block
- Search for “Shortcode”
- Add the Shortcode block
- Enter
[username_manager] - Click Update
For Classic Widgets:
- Go to Appearance → Widgets
- Drag a Text widget to your desired widget area
- Enter
[username_manager]in the content field - Click Save
Using Shortcode in Page Builders
Elementor
- Add a Shortcode widget to your page
- Enter
[username_manager]in the shortcode field - Style the widget as desired
Beaver Builder
- Add a HTML module
- Enter
[username_manager]in the HTML field - Save the module
Divi Builder
- Add a Code module
- Enter
[username_manager]in the code field - Save the module
WPBakery Page Builder
- Add a Raw HTML element
- Enter
[username_manager]in the content field - Save the element
Styling the Form
The shortcode outputs standard HTML with CSS classes you can customize:
Main Form Class
.aum-standard-form {
/* Your custom styles */
}
Input Field Classes
.aum-input-field {
/* Container for each input field */
}
.aum-input-field label {
/* Label styling */
}
.aum-input-field input {
/* Input field styling */
}
Button Styling
#username_change_submit {
/* Save Changes button */
}
Message Styling
.aum-error {
/* Error message container */
}
Add these styles to Appearance → Customize → Additional CSS or your child theme’s stylesheet.
Common Use Cases
Use Case 1: Dedicated Username Change Page
Create a page called “Change Username” with only the shortcode:
[username_manager]
Add this page to your user account navigation menu.
Use Case 2: Account Settings Page
Create an “Account Settings” page with multiple shortcodes:
<h2>Profile Settings</h2>
[profile_edit_shortcode]
<h2>Change Username</h2>
[username_manager]
<h2>Change Password</h2>
[password_change_shortcode]
Use Case 3: Sidebar Widget
Add the shortcode to a sidebar widget that appears only on user profile pages:
- Create a widget area
- Add the shortcode to a Text/Shortcode widget
- Display the widget conditionally using a plugin like Widget Options
Troubleshooting Shortcode Issues
Shortcode Displays as Text
Problem: The shortcode appears as [username_manager] instead of showing the form.
Solution:
- Verify the plugin is activated
- Check that you’re using square brackets
[]not parentheses or curly braces - Ensure there are no extra spaces in the shortcode
- Try switching to the Text/HTML editor and back
Form Not Showing
Problem: Nothing appears where the shortcode is placed.
Solution:
- Verify username changes are enabled in General Settings
- Check if you’re logged in
- Verify your user role has permission to change usernames
- Check for JavaScript errors in the browser console
- Disable other plugins to check for conflicts
Form Appears Unstyled
Problem: The form looks broken or has no styling.
Solution:
- Clear your browser cache
- Clear your site cache (if using a caching plugin)
- Check if your theme’s CSS is conflicting
- Verify the plugin’s CSS files are loading
Save Button Stays Disabled
Problem: The Save Changes button remains grayed out.
Solution:
- Ensure you’re entering a valid username
- Check that the username meets length requirements
- Verify the username is available
- Check browser console for JavaScript errors
Related Documentation
- Username Availability Check – Learn about real-time validation
- General Settings – Configure who can change usernames
- BuddyPress Integration – Alternative method for BuddyPress sites
- WooCommerce Integration – Alternative method for WooCommerce sites
- Troubleshooting – Fix common issues
