Tag Info

New answers tagged


The is_login_page() function is taken from here function is_login_page() { return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')); } function my_redirect() { //if you have the page id of landing. I would tell you to use if( is_page('page id here') instead //Don't redirect if user is logged in or user is trying to sign ...


you might need to add some 'priority' to the action call. Like: add_action('template_redirect', 'user_logged_in', 1, 1);


I think wp_login is executing before functions.php is actually opened, thus not setting the global variable. One possible solution to this is instead append to the URL: function open_menu($user_login) { wp_redirect(home_url().'?menu_open=true'); exit; } add_action('wp_login', 'open_menu'); Then you could get that value via ...


There are two more possible ways Use the browser's history API to manipulate the URL displayed at the address bar/ history. Use AJAX Redirection is the best solution for 100% browser support and it is probably the easiest to implement. You don't need to use any hook with that just do the processing without generating output and then redirect back to the ...

Top 50 recent answers are included