[memb_loginform]

Summary

This shortcode uses the built-in WordPress login form function to display a simple login form. You can style the login form using the standard WordPress CSS classes.

Shortcode Examples

This shortcode WILL NOT DISPLAY if you are already logged in or logged in as an admin!

[memb_loginform]

9

 

This is how the shortcode looks like with a redirect url and a show always parameter:

[memb_loginform show="always" redirect="http://www.yourdomain.com/members"]

The above shortcode will display the login box even after the user has logged in.  Once a user has logged in, it will redirect the user to http://www.yourmain.com/members.

Customized Example Usage:

[memb_loginform username_label="Email Address" button_label="Login Now" password_label="Password"]

new

Shortcode Parameters

redirect: Specify a URL to go to after login, or #current.page# to return to the current page.  By default the member will be directed to the page as specified in the membership level, or the home page if no page is specified by their membership.

form_id: default = ‘loginform’

username_label: default = ‘Username’

password_label: default = ‘Password’

remember: yes/no – default = ‘no’
When set to ‘no’ the remember me checkbox will not be shown. When set to yes and member checks the box, their login cookie will last for 14 days (they won’t need to enter credentials for 14 days). This does not remember the username or password – it just keeps them logged in for up to 2 weeks.

remember_label: default = ‘Remember Me’

button_label: default = ‘Log In’

show: default = ‘never’

 

Description

This shortcode uses the built-in WordPress login form function to display a simple login form. You can style the login form using the standard WordPress CSS classes.

The CSS classes are as follows:

.login-username
.login-password
.login-remember
.login-submit

If you don’t see your desired results when applying these classes, there are a couple of potential issues. Your theme’s CSS may be interfering, or if your CSS is in your content it may be mangled by WordPress. You can get around the WordPress formatting issue by moving your CSS into your theme’s style.css file, or by using one of the several plugins that allow you to add custom CSS to your pages from the WordPress page/post editor.

Shortcode Attributes

Conditional: No (?)
Nestable: No (?)
Accepts formatting: No (?)
Capturable: No (?)

FAQ

How Can I Add a Custom Failed Login Message?

By default, Memberium will display a “Login Failed” message if the user enters incorrect login details.

As of now, this message cannot be changed, but you can add an additional message.

For this, you’d use the [memb_if_get] shortcode. You would place this shortcode above your [memb_loginform] shortcode. Here’s an example:

[memb_if_get key=login test="=" value=failed]
Put the message you want to display here
[/memb_if_get]

[memb_loginform]