Title: designedwithpixels's Replies | WordPress.org

---

# designedwithpixels

  [  ](https://wordpress.org/support/users/designedwithpixels/)

 *   [Profile](https://wordpress.org/support/users/designedwithpixels/)
 *   [Topics Started](https://wordpress.org/support/users/designedwithpixels/topics/)
 *   [Replies Created](https://wordpress.org/support/users/designedwithpixels/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/designedwithpixels/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/designedwithpixels/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/designedwithpixels/engagements/)
 *   [Favorites](https://wordpress.org/support/users/designedwithpixels/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Removing logout confirmation](https://wordpress.org/support/topic/removing-logout-confirmation/)
 *  [designedwithpixels](https://wordpress.org/support/users/designedwithpixels/)
 * (@designedwithpixels)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/removing-logout-confirmation/#post-9647226)
 * [@jurasjo](https://wordpress.org/support/users/jurasjo/) ‘s code didnt work for
   me but [@caleb](https://wordpress.org/support/users/caleb/) ‘s did.
 * To redirect I just added “&redirect_to=logout”
 * “logout” is the name of the page (the permalink/url) I wanted to redirect to 
   in my case but you can use anything in there.
 * Final URL that I added to the menu via Custom Link with “Logout” label was:
 * [http://yourdomain.com/wp-login.php?action=logout&redirect_to=logout](http://yourdomain.com/wp-login.php?action=logout&redirect_to=logout)
 * With this code:
 *     ```
       function change_menu($items){
         foreach($items as $item){
           if( $item->title == "Logout"){
                $item->url = $item->url . "&_wpnonce=" . wp_create_nonce( 'log-out' );
           }
         }
         return $items;
   
       }
       add_filter('wp_nav_menu_objects', 'change_menu');
       ```
   
    -  This reply was modified 8 years, 7 months ago by [designedwithpixels](https://wordpress.org/support/users/designedwithpixels/).

Viewing 1 replies (of 1 total)