{"id":800,"date":"2026-10-20T09:05:16","date_gmt":"2026-10-20T08:05:16","guid":{"rendered":"https:\/\/userswp.io\/documentation\/article\/userswp-general-faq\/"},"modified":"2026-10-20T09:05:16","modified_gmt":"2026-10-20T08:05:16","slug":"userswp-general-faq","status":"publish","type":"gd_place","link":"https:\/\/userswp.io\/documentation\/article\/how-tos\/userswp-general-faq\/","title":{"rendered":"UsersWP general FAQ"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Answers to common UsersWP questions about general. Click a question to open the answer.<\/p>\n\n\n\n<div class=\"wp-block-blockstrap-blockstrap-widget-accordion accordion mb-3\">\n<div class=\"accordion-item\" id=\"heading-dashboard-shortcode\"><h2 class=\"accordion-header\"><button class=\"accordion-button\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-dashboard-shortcode\" aria-expanded=\"true\" aria-controls=\"collapse-dashboard-shortcode\">Which shortcode shows the UsersWP dashboard (dashboard.php)?<\/button><\/h2><div class=\"accordion-collapse collapse show\" id=\"collapse-dashboard-shortcode\" aria-labelledby=\"heading-dashboard-shortcode\" data-bs-parent=\"\"><div class=\"wp-block-blockstrap-blockstrap-widget-accordion-item accordion-body pb-0\">\n<p class=\"wp-block-paragraph\">There&#8217;s no separate shortcode for it. The <code>dashboard.php<\/code> template is what the <code>&#091;&lt;span&gt;&lt;\/span&gt;uwp_login&#093;<\/code> shortcode (the UWP &gt; 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8220;Logged in show&#8221; option controls what logged in users see:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>User Dashboard, the default, which uses <code>dashboard.php<\/code><\/li>\n\n\n\n<li>Simple username and logout link, using <code>dashboard-simple.php<\/code>: <code>&#091;&lt;span&gt;&lt;\/span&gt;uwp_login logged_in_show=&quot;simple&quot;&#093;<\/code><\/li>\n\n\n\n<li>Nothing: <code>&#091;&lt;span&gt;&lt;\/span&gt;uwp_login logged_in_show=&quot;empty&quot;&#093;<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You won&#8217;t see the dashboard on the page set as your login page in UsersWP &gt; General &gt; Pages, because UsersWP redirects logged in users from that page to the account page. To change the dashboard&#8217;s layout, copy the template into your theme as described in <a href=\"https:\/\/userswp.io\/documentation\/article\/how-tos\/how-to-override-templates-for-userswp\/\">How to override templates for UsersWP<\/a>.<\/p>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"accordion-item\" id=\"heading-change-button-colour\"><h2 class=\"accordion-header\"><button class=\"accordion-button collapsed\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-change-button-colour\" aria-expanded=\"false\" aria-controls=\"collapse-change-button-colour\">How do I change the button colour in UsersWP?<\/button><\/h2><div class=\"accordion-collapse collapse\" id=\"collapse-change-button-colour\" aria-labelledby=\"heading-change-button-colour\" data-bs-parent=\"\"><div class=\"wp-block-blockstrap-blockstrap-widget-accordion-item accordion-body pb-0\">\n<p class=\"wp-block-paragraph\">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 <a href=\"https:\/\/userswp.io\/documentation\/article\/first-steps\/ayecode-user-interface-aui\/\">AyeCode User Interface (AUI)<\/a> for more on this.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To change only the UsersWP form buttons, add custom CSS in Appearance > Customize > Additional CSS. The login and register submit buttons have the classes <code>uwp_login_submit<\/code> and <code>uwp_register_submit<\/code>, for example <code>.btn.uwp_login_submit, .btn.uwp_register_submit { background-color: #2a7ae2; border-color: #2a7ae2; }<\/code>. Change the colour code to your own.<\/p>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"accordion-item\" id=\"heading-restrict-pages-to-members\"><h2 class=\"accordion-header\"><button class=\"accordion-button collapsed\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-restrict-pages-to-members\" aria-expanded=\"false\" aria-controls=\"collapse-restrict-pages-to-members\">Can UsersWP restrict pages to logged-in members and redirect visitors?<\/button><\/h2><div class=\"accordion-collapse collapse\" id=\"collapse-restrict-pages-to-members\" aria-labelledby=\"heading-restrict-pages-to-members\" data-bs-parent=\"\"><div class=\"wp-block-blockstrap-blockstrap-widget-accordion-item accordion-body pb-0\">\n<p class=\"wp-block-paragraph\">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).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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 <code>template_redirect<\/code> hook can check <code>is_user_logged_in()<\/code> and <code>is_page()<\/code> and redirect to <code>wp_login_url( get_permalink() )<\/code>. UsersWP points that URL to your UsersWP login page, so members return to the page after logging in.<\/p>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"accordion-item\" id=\"heading-preg-match-nothing-to-repeat\"><h2 class=\"accordion-header\"><button class=\"accordion-button collapsed\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-preg-match-nothing-to-repeat\" aria-expanded=\"false\" aria-controls=\"collapse-preg-match-nothing-to-repeat\">Why do I get &quot;preg_match(): Compilation failed: nothing to repeat&quot; after activating UsersWP?<\/button><\/h2><div class=\"accordion-collapse collapse\" id=\"collapse-preg-match-nothing-to-repeat\" aria-labelledby=\"heading-preg-match-nothing-to-repeat\" data-bs-parent=\"\"><div class=\"wp-block-blockstrap-blockstrap-widget-accordion-item accordion-body pb-0\">\n<p class=\"wp-block-paragraph\">That warning comes from WordPress checking its rewrite rules (the file named in it is <code>wp-includes\/class-wp.php<\/code>). 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.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to Settings > Permalinks and click Save Changes without changing anything. This rebuilds the rules.<\/li>\n\n\n\n<li>Check the slugs of the pages set in UsersWP > Settings > General > Pages, the Profile page especially. Keep them to plain letters, numbers and hyphens.<\/li>\n\n\n\n<li>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.<\/li>\n<\/ol>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"accordion-item\" id=\"heading-profile-url-ninja-forms\"><h2 class=\"accordion-header\"><button class=\"accordion-button collapsed\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-profile-url-ninja-forms\" aria-expanded=\"false\" aria-controls=\"collapse-profile-url-ninja-forms\">How do I put a user&#x27;s UsersWP profile URL into a Ninja Forms field?<\/button><\/h2><div class=\"accordion-collapse collapse\" id=\"collapse-profile-url-ninja-forms\" aria-labelledby=\"heading-profile-url-ninja-forms\" data-bs-parent=\"\"><div class=\"wp-block-blockstrap-blockstrap-widget-accordion-item accordion-body pb-0\">\n<p class=\"wp-block-paragraph\">UsersWP doesn&#8217;t add merge tags to Ninja Forms, so fill the field with a small snippet. In PHP, <code>uwp_build_profile_tab_url( $user_id )<\/code> returns a user&#8217;s UsersWP profile URL.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add a hidden field to your form and set its default value to the text <code>uwp_profile_url<\/code>.<\/li>\n\n\n\n<li>Add the snippet below with a code snippets plugin or your child theme&#8217;s <code>functions.php<\/code>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><code>add_filter( &#039;ninja_forms_render_default_value&#039;, function( $value ) { if ( &#039;uwp_profile_url&#039; === $value &amp;&amp; is_user_logged_in() ) { $value = uwp_build_profile_tab_url( get_current_user_id() ); } return $value; } );<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Logged in users then submit their profile link with the form. While author links point to profiles (the default), <code>get_author_posts_url()<\/code> also returns the UsersWP profile URL.<\/p>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"accordion-item\" id=\"heading-change-form-colours\"><h2 class=\"accordion-header\"><button class=\"accordion-button collapsed\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-change-form-colours\" aria-expanded=\"false\" aria-controls=\"collapse-change-form-colours\">How do I change the colours and background of UsersWP forms and widgets?<\/button><\/h2><div class=\"accordion-collapse collapse\" id=\"collapse-change-form-colours\" aria-labelledby=\"heading-change-form-colours\" data-bs-parent=\"\"><div class=\"wp-block-blockstrap-blockstrap-widget-accordion-item accordion-body pb-0\">\n<p class=\"wp-block-paragraph\">UsersWP forms are styled with AyeCode UI, which is based on Bootstrap. Button and link colours come from Appearance &gt; Customize &gt; AyeCode UI, where you can set a Primary Color and a Secondary Color.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Backgrounds for the form card, inputs and dropdown menus aren&#8217;t settings, so change them with CSS in Appearance &gt; Customize &gt; Additional CSS. Scope the rules to <code>.bsui<\/code> so they only affect AyeCode UI elements, for example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>.bsui .card, .bsui .form-control, .bsui .dropdown-menu { background-color: #f2f2f2; }<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a dropdown shows two arrows, your theme is probably styling select fields as well. Use your browser&#8217;s inspector to find the rule that adds the second arrow and override it. More on the framework in <a href=\"https:\/\/userswp.io\/documentation\/article\/first-steps\/ayecode-user-interface-aui\/\">AyeCode User Interface (AUI)<\/a>.<\/p>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"accordion-item\" id=\"heading-hide-admin-bar\"><h2 class=\"accordion-header\"><button class=\"accordion-button collapsed\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-hide-admin-bar\" aria-expanded=\"false\" aria-controls=\"collapse-hide-admin-bar\">How do I hide the WordPress admin bar for users in UsersWP?<\/button><\/h2><div class=\"accordion-collapse collapse\" id=\"collapse-hide-admin-bar\" aria-labelledby=\"heading-hide-admin-bar\" data-bs-parent=\"\"><div class=\"wp-block-blockstrap-blockstrap-widget-accordion-item accordion-body pb-0\">\n<p class=\"wp-block-paragraph\">Yes, WordPress shows its admin bar to every logged-in user by default. You can hide it per user role in UsersWP:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to UsersWP > Settings > Redirects.<\/li>\n\n\n\n<li>Under each role you want to hide it for (Subscriber, for example), tick Hide Admin Bar.<\/li>\n\n\n\n<li>Leave it unticked for Administrator and Editor, then save.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The setting only affects the frontend, and it checks the user&#8217;s first role. You can also stop roles from opening the dashboard with Restrict wp-admin in UsersWP > Settings > General > Login.<\/p>\n<\/div><\/div><\/div>\n<\/div>\n<script type=\"application\/ld+json\">{\n    \"@context\": \"https:\/\/schema.org\",\n    \"@type\": \"FAQPage\",\n    \"mainEntity\": [\n        {\n            \"@type\": \"Question\",\n            \"name\": \"Which shortcode shows the UsersWP dashboard (dashboard.php)?\",\n            \"acceptedAnswer\": {\n                \"@type\": \"Answer\",\n                \"text\": \"There\\u0027s no separate shortcode for it. The dashboard.php template is what the [\\u003Cspan\\u003E\\u003C\/span\\u003Euwp_login] shortcode (the UWP \\u003E 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.\\n\\n\\n\\nThe \\u0022Logged in show\\u0022 option controls what logged in users see:\\n\\n\\n\\n\\nUser Dashboard, the default, which uses dashboard.php\\n\\n\\n\\nSimple username and logout link, using dashboard-simple.php: [\\u003Cspan\\u003E\\u003C\/span\\u003Euwp_login logged_in_show=\\u0022simple\\u0022]\\n\\n\\n\\nNothing: [\\u003Cspan\\u003E\\u003C\/span\\u003Euwp_login logged_in_show=\\u0022empty\\u0022]\\n\\n\\n\\n\\nYou won\\u0027t see the dashboard on the page set as your login page in UsersWP \\u003E General \\u003E Pages, because UsersWP redirects logged in users from that page to the account page. To change the dashboard\\u0027s layout, copy the template into your theme as described in How to override templates for UsersWP.\"\n            }\n        },\n        {\n            \"@type\": \"Question\",\n            \"name\": \"How do I change the button colour in UsersWP?\",\n            \"acceptedAnswer\": {\n                \"@type\": \"Answer\",\n                \"text\": \"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 \\u003E Customize \\u003E AyeCode UI and set the Primary Color (there is a Secondary Color too). See AyeCode User Interface (AUI) for more on this.\\n\\n\\n\\nTo change only the UsersWP form buttons, add custom CSS in Appearance \\u003E Customize \\u003E 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.\"\n            }\n        },\n        {\n            \"@type\": \"Question\",\n            \"name\": \"Can UsersWP restrict pages to logged-in members and redirect visitors?\",\n            \"acceptedAnswer\": {\n                \"@type\": \"Answer\",\n                \"text\": \"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 \\u003E Settings \\u003E General \\u003E Login \\u003E Restrict wp-admin, by role) and who sees each profile tab (Anyone, Logged in or Author only, set per tab in UsersWP \\u003E Form Builder \\u003E Profile Tabs).\\n\\n\\n\\nTo 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.\"\n            }\n        },\n        {\n            \"@type\": \"Question\",\n            \"name\": \"Why do I get \\u0022preg_match(): Compilation failed: nothing to repeat\\u0022 after activating UsersWP?\",\n            \"acceptedAnswer\": {\n                \"@type\": \"Answer\",\n                \"text\": \"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.\\n\\n\\n\\n\\nGo to Settings \\u003E Permalinks and click Save Changes without changing anything. This rebuilds the rules.\\n\\n\\n\\nCheck the slugs of the pages set in UsersWP \\u003E Settings \\u003E General \\u003E Pages, the Profile page especially. Keep them to plain letters, numbers and hyphens.\\n\\n\\n\\nIf 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.\"\n            }\n        },\n        {\n            \"@type\": \"Question\",\n            \"name\": \"How do I put a user\\u0027s UsersWP profile URL into a Ninja Forms field?\",\n            \"acceptedAnswer\": {\n                \"@type\": \"Answer\",\n                \"text\": \"UsersWP doesn\\u0027t 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\\u0027s UsersWP profile URL.\\n\\n\\n\\n\\nAdd a hidden field to your form and set its default value to the text uwp_profile_url.\\n\\n\\n\\nAdd the snippet below with a code snippets plugin or your child theme\\u0027s functions.php.\\n\\n\\n\\n\\nadd_filter( \\u0027ninja_forms_render_default_value\\u0027, function( $value ) { if ( \\u0027uwp_profile_url\\u0027 === $value \\u0026\\u0026 is_user_logged_in() ) { $value = uwp_build_profile_tab_url( get_current_user_id() ); } return $value; } );\\n\\n\\n\\nLogged 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.\"\n            }\n        },\n        {\n            \"@type\": \"Question\",\n            \"name\": \"How do I change the colours and background of UsersWP forms and widgets?\",\n            \"acceptedAnswer\": {\n                \"@type\": \"Answer\",\n                \"text\": \"UsersWP forms are styled with AyeCode UI, which is based on Bootstrap. Button and link colours come from Appearance \\u003E Customize \\u003E AyeCode UI, where you can set a Primary Color and a Secondary Color.\\n\\n\\n\\nBackgrounds for the form card, inputs and dropdown menus aren\\u0027t settings, so change them with CSS in Appearance \\u003E Customize \\u003E Additional CSS. Scope the rules to .bsui so they only affect AyeCode UI elements, for example:\\n\\n\\n\\n.bsui .card, .bsui .form-control, .bsui .dropdown-menu { background-color: #f2f2f2; }\\n\\n\\n\\nIf a dropdown shows two arrows, your theme is probably styling select fields as well. Use your browser\\u0027s inspector to find the rule that adds the second arrow and override it. More on the framework in AyeCode User Interface (AUI).\"\n            }\n        },\n        {\n            \"@type\": \"Question\",\n            \"name\": \"How do I hide the WordPress admin bar for users in UsersWP?\",\n            \"acceptedAnswer\": {\n                \"@type\": \"Answer\",\n                \"text\": \"Yes, WordPress shows its admin bar to every logged-in user by default. You can hide it per user role in UsersWP:\\n\\n\\n\\n\\nGo to UsersWP \\u003E Settings \\u003E Redirects.\\n\\n\\n\\nUnder each role you want to hide it for (Subscriber, for example), tick Hide Admin Bar.\\n\\n\\n\\nLeave it unticked for Administrator and Editor, then save.\\n\\n\\n\\n\\nThe setting only affects the frontend, and it checks the user\\u0027s first role. You can also stop roles from opening the dashboard with Restrict wp-admin in UsersWP \\u003E Settings \\u003E General \\u003E Login.\"\n            }\n        }\n    ]\n}<\/script>","protected":false},"excerpt":{"rendered":"<p>Answers to common UsersWP questions about general. Click a question to open the answer.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[41,7],"class_list":["post-800","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-how-tos","gd_placecategory-tips-tricks-more"],"_links":{"self":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/comments?post=800"}],"version-history":[{"count":0,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/800\/revisions"}],"wp:attachment":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/media?parent=800"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/tags?post=800"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/categories?post=800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}