Version 2.16 – Redirects

The main change in this version is the new “Redirects” feature.

Redirect Types

You can create a few kinds of redirects:

  • Login Redirect lets you send the user to a specific URL when they log into WordPress. You can redirect to an existing admin page or a custom URL.
  • Logout Redirect lets you redirect the user somewhere when they log out.
  • Registration Redirect lets you choose the page that a new user will see after they register an account.
  • First Login Redirect is just like a login redirect, except it only happens when the user logs in for the first time.

Redirect settings

Redirect Features

  • You can make redirects for specific roles, specific users, or all users.
  • Use shortcodes in redirect URLs.
  • Drag & drop role redirects to change their priority.
  • If something goes wrong, you can disable all custom redirects by adding this line to wp-config.php: define('AME_DISABLE_REDIRECTS', true);

New Shortcodes

This version also adds a few new shortcodes that can help create dynamic redirects. Of course, you can also use these shortcodes in posts and pages.

  • [ame-wp-admin] – base URL of the WordPress dashboard.
  • [ame-home-url] – site URL. Usually the same as “Site Address” in Settings → General.
  • [ame-user-info field="..."] – information about the logged-in user. Use the field parameter to choose one profile field or property to display. Parameters:
    • field – Supported fields include: ID, user_login, display_name, locale, user_nicename, user_url, and so on.
    • placeholder – Optional. Text that will be shown if the visitor is not logged in.
    • encoding – Optional. This lets you control how the plugin will encode or escape the output. Supported values:
      • auto (default) – the plugin will automatically choose either html or none depending on the context.
      • html – convert quotes and special characters like > and & to HTML entities.
      • attr – as html, but for use inside HTML tag attributes.
      • attr – escape text for use in inline JavaScript.
      • none – no special encoding; output the text as-is.

See the changelog for a few more minor details about this release.

Comments are closed.