{"id":54481,"date":"2017-08-28T19:49:02","date_gmt":"2017-08-28T22:49:02","guid":{"rendered":"https:\/\/wiki.samuelchopard.ch\/?p=54481"},"modified":"2019-03-18T14:29:19","modified_gmt":"2019-03-18T13:29:19","slug":"redirect-user-after-logout","status":"publish","type":"post","link":"https:\/\/samuelchopard.ch\/wiki\/library\/redirect-user-after-logout\/","title":{"rendered":"Redirect user after logout"},"content":{"rendered":"<p><!--more--><\/p>\n<p>Paste the following code in your theme&#8217;s <em>functions.php<\/em>:<\/p>\n<pre class=\"EnlighterJSRAW\">add_action( 'wp_logout', 'auto_redirect_external_after_logout');\nfunction auto_redirect_external_after_logout(){\n  wp_redirect( 'URL OF REDIRECTION' );\n  exit();\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>Source:\u00a0<a target=\"_blank\" href=\"https:\/\/wordpress.stackexchange.com\/questions\/15633\/how-can-i-redirect-user-after-entering-wrong-password\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/wordpress.stackexchange.com\/questions\/15633\/how-can-i-redirect-user-after-entering-wrong-password<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Paste the following code in your theme's functions.php: add_action( 'wp_logout', 'auto_redirect_external_after_logout'); function auto_redirect_external_after_logout(){ wp_redirect( 'URL OF REDIRECTION' ); exit(); } [...]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[170,171,240],"class_list":["post-54481","post","type-post","status-publish","format-standard","hentry","category-php-tricks","tag-logout","tag-logout-redirect","tag-redirect"],"_links":{"self":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/54481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/comments?post=54481"}],"version-history":[{"count":1,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/54481\/revisions"}],"predecessor-version":[{"id":54858,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/54481\/revisions\/54858"}],"wp:attachment":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/media?parent=54481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/categories?post=54481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/tags?post=54481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}