wp_logout_url Logout function returns 404
-
HI, im using the wp_logout_url() function to logout from a custom admin (backend) page – it does dont work. It redirects to a 404 page and im still logged in. This is the url where im redirected to and see the 404 error
…wp-login.php?action=logout&redirect_to=%2F&_wpnonce=772b374e9a
despite i set up a custom log in url which works fine so far. When i logout from the woocommerce my-account page (Frontend) it works. I added the code for the funtions.php to create my logout menu item to reproduce if you have some spare time. Would be gret if you look into it. thxadd_action( 'admin_menu', 'create_lout' ); function create_lout() { add_menu_page( __( 'Logout', 'woocommerce' ), // Single Name for Menu Item __( 'Logout', 'woocommerce' ), // Plural Name for Menu Item 'manage_woocommerce', // manage options for example edit_posts ''. wp_logout_url('/') .'', // Url of the menu item NULL, // callback 'dashicons-no' ); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_logout_url Logout function returns 404’ is closed to new replies.