How to use it
- Open Bricks > Kiln and turn on Site: login and logout redirects.
- Open the module's settings under its row.
- Enter a URL in After login, After registration and After logout. Leave a field empty to keep the default for that event.
- To send a role somewhere else, enter a URL next to that role under By role. It applies to login and registration, and the first role in the list that the user has wins.
- Save the page.
You can enter a full URL or a path such as /my-account/.
How it works with "log in to continue" links
A link that asks for its own destination keeps it. This covers WordPress login links with a redirect_to
address, and WooCommerce login forms that carry a redirect. Your URL applies when nothing else asked for a
destination. WordPress' default of the admin dashboard counts as no request.
Limits
- Only URLs on your own site, or on a host WordPress allows for redirects, are saved. Any other URL is cleared when you save.
- Roles apply to login and registration. Logout uses the After logout URL for everyone.
- A role URL beats the site-wide URL. A user with several roles gets the URL of the first of their roles in the list.
- After registration, the role rule applies when the new user is logged in at that point. Otherwise the After registration URL is used.
- Bricks' own
bricks/auth/custom_*_redirectfilters choose which page replaces wp-login.php. They do not set where a user goes afterwards, so Kiln does not use them.
Settings
Under the module's row in Bricks > Kiln:
- After login, After registration, After logout: one URL each.
- By role: one URL field for each role on your site.
The module is off by default because it changes behavior as soon as you fill in a URL.
Requirements
Bricks 2.4 or newer. WooCommerce is not required. The WooCommerce login and registration forms are covered when WooCommerce is active.