I am trying to detect the page of the user and then redirect based on that, just of testing purposes now since i want to verify user role and if they are a certain role they will be redirected out from the page. Anyway the following code is not working despite research and trial and error:
function wpse12535_redirect_sample() {
if(is_page_template('list-projects.php')) {
wp_redirect('http://ift.tt/2nFpIxN');
}
}
add_action( 'init', 'wpse12535_redirect_sample' );
Aucun commentaire:
Enregistrer un commentaire