This shortcode displays a login form that will redirect the user to the current page after login. Here is a useful example that can be embedded on a page:

Please log in to access the affiliate area.

Your page will show:

Screen Shot 2015-02-11 at 17.28.23

This shortcode will accept the redirect_url attribute to redirect to another page (instead of the current one) after successful login.


[affiliates_login_redirect redirect_url=""]

The URL must be pointing to a page on the same host, otherwise the user will be redirected to the WordPress Dashboard after logging in. If a redirect to another domain is required, it must be added by using the filter allowed_redirect_hosts (this codex page provides an example).