{"id":765,"date":"2026-10-20T09:03:10","date_gmt":"2026-10-20T08:03:10","guid":{"rendered":"https:\/\/userswp.io\/documentation\/article\/open-login-lightbox-from-any-link\/"},"modified":"2026-10-20T09:03:10","modified_gmt":"2026-10-20T08:03:10","slug":"open-login-lightbox-from-any-link","status":"publish","type":"gd_place","link":"https:\/\/userswp.io\/documentation\/article\/how-tos\/open-login-lightbox-from-any-link\/","title":{"rendered":"How to open the UsersWP login lightbox from any link or button"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">UsersWP can open its login, register and forgot password forms in a lightbox. Menu items added from the UsersWP Endpoints box do this on their own. To get the same lightbox from a text link, an image or a button anywhere else, add one of these classes to the link:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>uwp-login-link<\/code> opens the login form.<\/li>\n\n\n\n<li><code>uwp-register-link<\/code> opens the register form.<\/li>\n\n\n\n<li><code>uwp-forgot-password-link<\/code> opens the forgot password form.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Put the class on the <code>&lt;a&gt;<\/code> tag. Keep the link pointing at your real login or register page, so it still works if the lightbox is turned off.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&lt;a href=&quot;\/login\/&quot; class=&quot;uwp-login-link&quot;&gt;Log in&lt;\/a&gt;\n\n&lt;a href=&quot;\/register\/&quot; class=&quot;uwp-register-link&quot;&gt;&lt;img src=&quot;\/wp-content\/uploads\/join-button.png&quot; alt=&quot;Join&quot;&gt;&lt;\/a&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can use a data attribute instead of a class: <code>data-uwp-link=&quot;login&quot;<\/code>, <code>data-uwp-link=&quot;register&quot;<\/code> or <code>data-uwp-link=&quot;forgot-password&quot;<\/code>. This helps with page builders that let you add custom attributes to a button.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">If the link opens the page instead<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the lightbox settings. Login Lightbox is under UsersWP > General > Login, Register Lightbox under UsersWP > General > Register and Forgot password lightbox under UsersWP > General > Change Password. All three are on by default.<\/li>\n\n\n\n<li>Check the design style. The lightbox needs Default Design Style set to Bootstrap under UsersWP > General > Developer. With Legacy (non-bootstrap) the links open the normal pages.<\/li>\n\n\n\n<li>Clear your cache and any CSS or JavaScript optimisation, then test again in a private window.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">After a successful login in the lightbox, UsersWP reloads the current page. To send users to your login redirect page instead, tick Enable Login Lightbox Redirect under UsersWP > General > Login.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To do the opposite and stop menu links from opening a lightbox, see <a href=\"https:\/\/userswp.io\/documentation\/article\/how-tos\/how-to-disable-modal-login-register-for-userswp-navigation-endpoints\/\">How to Disable Modal Login\/Register for UsersWP Navigation EndPoints<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UsersWP can open its login, register and forgot password forms in a lightbox. Menu items added from the UsersWP Endpoints box do this on their own. To get the same lightbox from a text link, an image or a button anywhere else, add one of these classes to the link: Put the class on the [&hellip;]<\/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-765","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\/765","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=765"}],"version-history":[{"count":0,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/765\/revisions"}],"wp:attachment":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/media?parent=765"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/tags?post=765"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/categories?post=765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}