Title: Variable with unique url
Last modified: August 22, 2016

---

# Variable with unique url

 *  [fsoto](https://wordpress.org/support/users/fsoto/)
 * (@fsoto)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/variable-with-unique-url/)
 * 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/](https://wordpress.org/plugins/peters-login-redirect/)

Viewing 1 replies (of 1 total)

 *  [Chris Dillon](https://wordpress.org/support/users/cdillon27/)
 * (@cdillon27)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/variable-with-unique-url/#post-5184676)
 * 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.

 * ![](https://ps.w.org/peters-login-redirect/assets/icon-256x256.png?rev=2597671)
 * [LoginWP (Formerly Peter's Login Redirect)](https://wordpress.org/plugins/peters-login-redirect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/peters-login-redirect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/peters-login-redirect/)
 * [Active Topics](https://wordpress.org/support/plugin/peters-login-redirect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/peters-login-redirect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/peters-login-redirect/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chris Dillon](https://wordpress.org/support/users/cdillon27/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/variable-with-unique-url/#post-5184676)
 * Status: not resolved