1. Home
  2. ReHub Theme
  3. User submit, memberships, profiles
  4. Setup User login and register PopUp, menus

Setup User login and register PopUp, menus

First of all, you need to enable user registration in WordPress. Go to  Settings   General   Membership  and enable Anyone can register.

Next step. You can enable theme’s login section in header or menu (optional).

For this, go to  Theme option   User options  and enable User login modal.

Now, we can add login button to site. There are many ways to do this. In most cases such button will be good in header and you can add this button in several places: top line, logo line, main menu line.

Top line

Check select in  Theme options   User option   Add additional login icon in header . Choose In top line.

Main menu

The same as previous, but choose In main menu.

In logo section

I recommend this place for community websites.

Go to  Theme options   Header and menu   Select Header style  and choose Customizable header layout. This layout has many additional options and you can add login section, search, additional button + additional small menu in logo section row.

Some description of all options of Customizable header

Set padding from top and bottom (without px)

This will change default padding between top and bottom of logo section and additional buttons. In most cases you don’t need change this, but sometimes buttons will be not in center of section (depends on logo size). You can also use this option with combination of logo padding (it is in  Theme option   Logo option .

Enable login/register section

This will enable login section in header. By default, theme’s AJAX Popop will be used, but if you set Type URL for login button inside  Theme option   User option   Type URL for login button  login button will be redirected to your custom URL.

After login, user will see special dropdown. By default, dropdown has only avatar, name and log out, you can also add profile and submit post links if you choose such pages in  Theme option   User option   Select page for user profile . Also, you can add other links in this menu. For this, create new menu in  Appearance   Menus  and assign it to ‘User Logged In Menu location’. All links from this menu will be added to dropdown.

BuddyPress notifications are supported in dropdown automatically, as well as myCRED points:


BuddyPress email activation. By default, BuddyPress send activation email for users. You can disable this in  Theme option   User option   Synchronization between login popup and BP .

Custom register link in Popup. Also, very common need is when you want to use Login Popup, but you want to send users to register on separate page instead of Register in Popup. This can be useful if your separate register page has much more fields or important settings. In this case, you can set custom register URL in  Theme option   User option   Add custom register link .

Add custom redirect after login URL. You can also activate redirect after login in  Theme option   User option   Add custom redirect after login URL .

Enable additional button in headerThis will add additional button. Usually I use it with link on page where user can submit post. You can also add label for button, link, choose color of button. One more option – Enable login Popup for non registered users. Use this if you want to show login/registered Popup instead of link of button when non registered users click on button.

Enable search form in header – enables compact search form near buttons

Enable additional menu near logo – enables additional menu near logo. Don’t use big menus, because maximum width is 300px of this section. Use it for important parts of site. For example, group archives, shop page, etc. You can create additional menu in  Appearance   Menus .

Logged in conditional menu

One more tip. You can change your top menu for logged in users. For example, default menu will be visible for guests, and another menu will be for logged in users. For this, create new menu in  Appearance   Menus  and add it to User Logged In Menu location. Then enable this option:  Theme options   Header and menu   Replace top menu when user logined .

Helper shortcodes

Also, I added additional helper shortcodes

[wpsm_is_user]Your content[/wpsm_is_user]

Such content will be visible only for logged in users.

[wpsm_is_guest]Your content[/wpsm_is_guest]

This content is only for guests.