Last active
August 16, 2017 17:21
-
-
Save davidzack/194f37444c9d68630308ee416381ef61 to your computer and use it in GitHub Desktop.
Revisions
-
davidzack revised this gist
Feb 20, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,8 @@ function my_page_template_redirect() 'lastName' => $current_user->user_lastname, ), $url ); return $url; //nope wp_redirect ($url); //too many redirects... exit(); } -
davidzack created this gist
Feb 20, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ function my_page_template_redirect() { if( is_front_page() && is_user_logged_in() ) { global $current_user; get_currentuserinfo(); $url = add_query_arg( array( 'firstName' => $current_user->user_firstname, 'lastName' => $current_user->user_lastname, ), $url ); return $url; exit(); } } add_action( 'template_redirect', 'my_page_template_redirect' );