Answers to common UsersWP questions about general. Click a question to open the answer.
There’s no separate shortcode for it. The dashboard.php template is what the [<span></span>uwp_login] shortcode (the UWP > Login block or widget) shows to someone who is already logged in. Logged out visitors see the login form in the same spot, which makes it a good fit for a sidebar or header area.
The “Logged in show” option controls what logged in users see:
- User Dashboard, the default, which uses
dashboard.php - Simple username and logout link, using
dashboard-simple.php:[<span></span>uwp_login logged_in_show="simple"] - Nothing:
[<span></span>uwp_login logged_in_show="empty"]
You won’t see the dashboard on the page set as your login page in UsersWP > General > Pages, because UsersWP redirects logged in users from that page to the account page. To change the dashboard’s layout, copy the template into your theme as described in How to override templates for UsersWP.
UsersWP buttons use the primary colour from AyeCode UI, the Bootstrap based styling shared by our plugins. To change it for every AyeCode plugin on the site, go to Appearance > Customize > AyeCode UI and set the Primary Color (there is a Secondary Color too). See AyeCode User Interface (AUI) for more on this.
To change only the UsersWP form buttons, add custom CSS in Appearance > Customize > Additional CSS. The login and register submit buttons have the classes uwp_login_submit and uwp_register_submit, for example .btn.uwp_login_submit, .btn.uwp_register_submit { background-color: #2a7ae2; border-color: #2a7ae2; }. Change the colour code to your own.
UsersWP does not restrict access to pages or posts. It handles registration, login, profiles and accounts. What it can limit is the wp-admin area (UsersWP > Settings > General > Login > Restrict wp-admin, by role) and who sees each profile tab (Anyone, Logged in or Author only, set per tab in UsersWP > Form Builder > Profile Tabs).
To send logged-out visitors from a members page to the login page, use a content restriction or membership plugin. If you prefer code, a small snippet on the template_redirect hook can check is_user_logged_in() and is_page() and redirect to wp_login_url( get_permalink() ). UsersWP points that URL to your UsersWP login page, so members return to the page after logging in.
That warning comes from WordPress checking its rewrite rules (the file named in it is wp-includes/class-wp.php). One of the stored rules is not a valid pattern. UsersWP adds rules for the profile page when it is activated, so the warning can show up then even when another plugin, the theme or a page slug made the bad rule.
- Go to Settings > Permalinks and click Save Changes without changing anything. This rebuilds the rules.
- Check the slugs of the pages set in UsersWP > Settings > General > Pages, the Profile page especially. Keep them to plain letters, numbers and hyphens.
- If the warning comes back, deactivate the other plugins and switch to a default theme on a staging copy, then reactivate them one at a time to find the one adding the broken rule.
UsersWP doesn’t add merge tags to Ninja Forms, so fill the field with a small snippet. In PHP, uwp_build_profile_tab_url( $user_id ) returns a user’s UsersWP profile URL.
- Add a hidden field to your form and set its default value to the text
uwp_profile_url. - Add the snippet below with a code snippets plugin or your child theme’s
functions.php.
add_filter( 'ninja_forms_render_default_value', function( $value ) { if ( 'uwp_profile_url' === $value && is_user_logged_in() ) { $value = uwp_build_profile_tab_url( get_current_user_id() ); } return $value; } );
Logged in users then submit their profile link with the form. While author links point to profiles (the default), get_author_posts_url() also returns the UsersWP profile URL.
UsersWP forms are styled with AyeCode UI, which is based on Bootstrap. Button and link colours come from Appearance > Customize > AyeCode UI, where you can set a Primary Color and a Secondary Color.
Backgrounds for the form card, inputs and dropdown menus aren’t settings, so change them with CSS in Appearance > Customize > Additional CSS. Scope the rules to .bsui so they only affect AyeCode UI elements, for example:
.bsui .card, .bsui .form-control, .bsui .dropdown-menu { background-color: #f2f2f2; }
If a dropdown shows two arrows, your theme is probably styling select fields as well. Use your browser’s inspector to find the rule that adds the second arrow and override it. More on the framework in AyeCode User Interface (AUI).
Yes, WordPress shows its admin bar to every logged-in user by default. You can hide it per user role in UsersWP:
- Go to UsersWP > Settings > Redirects.
- Under each role you want to hide it for (Subscriber, for example), tick Hide Admin Bar.
- Leave it unticked for Administrator and Editor, then save.
The setting only affects the frontend, and it checks the user’s first role. You can also stop roles from opening the dashboard with Restrict wp-admin in UsersWP > Settings > General > Login.