Created
February 9, 2013 18:41
-
-
Save fatihtoprak/4746512 to your computer and use it in GitHub Desktop.
Kullanıcı yönlendirme wp_redirect Daha fazla detay için http://www.fatihtoprak.com/uye-girisi-yapmayan-kullanicilara-icerik-sayfasini-gostermemek-ipucu-125.html
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 characters
<?php | |
//redirect subscribers to the home url | |
add_action( 'admin_init', 'custom_profile_redirect', 12 ); | |
function custom_profile_redirect() { | |
global $current_user; | |
get_currentuserinfo(); | |
if ($current_user->user_level == 0) | |
{ | |
wp_redirect( home_url() ); exit; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment