If you want to redirect to the page you’re currently on use:
wp_logout_url( $_SERVER['REQUEST_URI'] );
or
wp_logout_url( get_permalink() );
Or if you want to redirect to another site use the allowed_redirect_hosts function.
Related Posts:
- Masking logout URL
- Logout Redirect and also WP-login.php Redirect
- How to load scripts/styles specific for a page
- functions.php inject inline css
- Logout redirect to current page – function
- How do I create a new WP admin color scheme?
- Paged Single Post doesn’t redirect to the main url after Removing Pagination
- Add attribute to link tag that’s generated through wp_register_style?
- TinyMCE custom stylesheets for different post types
- redirect wp-login.php to another page
- How to redirect users to custom lostpassword page?
- Remove “says” from comments
- How to add CSS style sheet dynamically in wordpress
- Simple/basic use of get_current_screen
- How do I redirect upon login a specific user based on role?
- Is it possible to be more page/post specific with admin_enqueue_script?
- Child Theme Not Overriding Parent Theme
- CSS stylesheet not loading
- Enqueue styles after a plugin
- How to add background image control to page admin controls?
- Add class or ID to any WordPress function
- Register and enqueue style.css custom theme
- Multiple CSS body classes to specific page I.D.’s – is this possible?
- Ninja form Redirect depending on text field content [closed]
- Load .txt file for login_message in wp-login.php
- Redirect specific page in WordPress for first time visit
- How do I redirect all 404 error url to Subcategory url
- How to change login labels
- Enqueue Style Only On Certain Pages Not Working
- Why does the ‘wp_nav_menu’ function work only until a menu is created?
- Child Theme files – what is needed?
- How do I add Bootstrap and LESS to my migrated WordPress site?
- How to Display Frontend CSS for Administrator only
- Removing wp_login_viewport_meta
- WordPress Menuing Question :focus
- change the url paths in the stylesheet dynamically
- 404 redirect to previous category
- Login Redirect if Logged in from Specific Page
- Please Explain the Importing Process of Multiple Stylesheets for Child Themes
- Redirect to another page if the user is logged in when pressing again the login button on menu bar
- Incorrect redirect after commenting
- Change CSS for logged in users
- How to stop wordpress from injecting hard-coded style into image attachments with captions
- different style sheet for just one page template
- Custom styles.css sheet for visual editor
- Is my code correct to enqueue CSS on a specific page?
- header_image() with CSS
- Not all CSS elements transferring via parent to child?
- How i can put $_GET codes in function.php?
- Split Media Queries in different files!
- Some questions about how proper add 2 CSS file in a WordPress theme?
- Why does get_template_directory_uri() not include “www”, only for enqueued stylesheets?
- problem loading stylesheets to wp_head dynamically
- Page get parameter doesn’t work with is_single() function
- Redirect website domain (including all pages) to external URL after Popup message (few seconds)
- Contact Form 7 If Condition
- error at login page in wordpress
- Solved: redirect to another page using functions.php
- Redirect to other page if login
- How to insert class in each list of categories?
- Parent theme styles overriding child theme CSS [closed]
- I can’t add CSS with functions.php
- Theme JS is available but theme CSS isn’t
- Proper Way to Load stylesheet on Condition
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- How to add array [closed]
- Default Nav Highlight
- Custom styles in Tiny MCE with an external CSS file
- why can’t i add front.css to my frontpage.php
- WordPress website keeps loading the maintenance page
- get_template_directory_uri() links to child theme not parent
- Redirects based on a JSON file
- remove/hide wp-editor
- Getting out side of wp root folder from function.php using absolute path
- Page Template Won’t Load Correct CSS File
- current_page_item is missing inside wp_nav_menu
- define css class in functions.php
- Add Login and logout buttons to top menu bar
- Show errormessages on wrong username/password on custom loginform?
- template_redirect action only firing if logged in
- Completely Disable WordPress RSS Feeds
- How to redirect Subscribers on login to specific page, when logging in from a Page
- Advanced method to control cache of enqueued style/script
- Redirect to one of two pages after data submitted, depending on the current url
- Combine page types and Custom Taxonomy in a functions.php command
- Can’t load assets
- How to reference different css (bootstrap) stylesheets for the header and body of a page?
- Unable to login after registration
- Can we have conditional CSS styling?
- CSS style and app.js not loading
- Post content overflows on my mobile phone
- Stylesheet does not load despite functions.php
- Remove clickable Link of WordPress Site Logo from Woocommerce Single Product page
- Re-style Login Form Whilst Keeping CSS Separate from Frontend CSS
- Wildcard 301 Redirect Using Theme Function
- How do I make a custom “Read More Blogs” button for my blog page
- function class doesnt work
- Help using ShortCodes to style whole chunks of the post
- Competing Login Redirects – Need to be Combined?
- Postback redirect through add_action is not triggered