• I am hoping someone can point me in the right direction. So currently I have unique URLs for each user and I have them saved in the website field of the user info. I know that we can set a variable for all users however the variable takes the actual siteurls and appends the variable to it. What I need to happen is that the variable be able to do the following.

    1. pull the content in the website field of the user data
    2. not append to the home url but instead use the entire url provided in the website link as the redirect.

    Is this possible? Can anyone point me in the right direction?

    https://wordpress.org/plugins/peters-login-redirect/

Viewing 1 replies (of 1 total)
  • Add this to your theme’s functions.php:

    /**
     * Return user's website URL
     * for Peter's Login Redirect plugin.
     */
    function my_user_url( $bool, $variable, $user ) {
      if( 'user_url' == $variable )
        return $user->user_url;
    }
    add_filter( 'rul_replace_variable', 'my_user_url', 10, 3 );

    Use this in the login/logout URL fields:

    [variable]user_url[/variable]

    [Edit: corrected variable name]

Viewing 1 replies (of 1 total)
  • The topic ‘Variable with unique url’ is closed to new replies.