I need to do the next step:
To redirect my logout, I put the next code in functions.php
function out_home(){
wp_redirect(home_url());
exit();
}
add_action("wp_logout","out_home");
In my header.php, to change the value of my URL in the login:
$URL_POSTLOGIN = add_query_arg(array(),$wp->request);
function login_go_home($URL_POSTLOGIN){
wp_redirect($URL_POSTLOGIN);
exit();
}
add_action("wp_login","login_go_home");
Maybe is not the best solution but in my case others codes fails.
Related Posts:
- How to change login labels
- error at login page in wordpress
- Show errormessages on wrong username/password on custom loginform?
- Unable to login after registration
- wp_enqueue_script was called incorrectly
- Masking logout URL
- Logout/login redirect CSS issue
- How can I tell if I’m on a login page? [duplicate]
- Is it possible to use a forgot password url filter?
- redirect wp-login.php to another page
- Login using the password from protected pages
- How do I redirect upon login a specific user based on role?
- Logging in redirects to correct page but shows logged out content until forced refresh
- Remove default user registration, login and subscriber profiles
- is_user_logged_in not working to redirect only logged out users
- Members only site – still need the lost password page accessible
- Load .txt file for login_message in wp-login.php
- How can I get my Script to work on the Login page?
- Removing wp_login_viewport_meta
- Login Redirect if Logged in from Specific Page
- Unable to login using username
- When a user logs in, how can they view the website instead of the admin menu?
- WordPress PHP Conflicting User Sessions
- Get User Login Data (date, time… )
- Registration Hooks don’t appear to be working
- If user is logged-in display/hide something
- Secondary Menu and Logged In Users
- Prevent WordPress Automatic Logout
- Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce] [closed]
- Logout Redirect and also WP-login.php Redirect
- loginout function customization
- Add Login and logout buttons to top menu bar
- WordPress login set cookie that survive browser exit (wp_signon function)
- This code is supposed to only allow user to be authenticated if accountVerified is equal to 1, but it still allows user to be authenticated otherwise
- Prevent wp_signon redirect on failed login for ajax login
- How to redirect Subscribers on login to specific page, when logging in from a Page
- How to replace ACTION url from original wordpress login form?
- Allow logged in user to view a Page, else send to login screen and then redirect back to Page
- Re-style Login Form Whilst Keeping CSS Separate from Frontend CSS
- How to change form action of wp-login page with a function
- True email confirmation for registration (keeping unvalidated users from user table)
- Login functions
- WordPress permanently logging users out
- disable WP_error: authentication_failed
- How to request login for user but not for bots
- is_user_logged_in() isn’t working
- update_user_option not working as expected
- “Headers already sent” while trying to add a CSS file to my login page?
- Why use if function_exists?
- Use AJAX in shortcode
- WordPress Theme Update Action?
- Does WordPress Development Mode Exist (with not minified JS)?
- WP_Query in functions.php
- what is the meaning of settings_fields()
- Organize functions.php
- Edit the_content function
- write in functions.php
- get excerpt without images
- display 100 products per page on product category page [closed]
- Checked() showing up twice in custom fields
- Gravity Forms field entries into wp_query loop [closed]
- Global functions on WPMU
- Remove the deleted users avatar from list
- is_account_page() change to page slug
- Adding to fontawesome-webfont.woff2 to boost website speed
- How to enable template page only for a post id page
- set_post_thumbnail when user is not logged in
- Passing User_Fields to Contact form 7 [duplicate]
- How can this crude function be improved?
- How to override woocommerce.css?
- Author Date Function not working as expected [duplicate]
- Add_filter when value is no variable?
- wp_star_rating() – Adding a 5 star rating system to theme
- How to hide image-url if no attachment?
- Default Nav Highlight
- WordPress Website with Login system
- Return link pages instead of displaying them
- Adding Read More to Custom excerpts
- Add a custom function to widget code
- Add custom taxonomy using JS in post editor
- How can I show a specific page to admins only?
- search and replace using regex
- post value to function with Ajax and jQuery
- (Divi): How to make WordPress load images of specific size for Blurb modules on given page with a funciton?
- Strip all HTML tags from product content and resave
- How do I dequeue a Stylesheet, stored in an ‘Assets’ folder?
- Author Page User id in functions.php for non login user
- How to add widget in main menu
- Best way to add image to recent posts widget?
- wp_enqueue_script only works outside of action
- How can I include user meta information in the resulting array of a WP_User_Query?
- How to add next height number in Order Attributes inside the Add new page. [duplicate]
- Get Value of Custom Field
- Need a functions that adds (adm)/(mod) if current user is admin/moderator right after their username
- Add title & subtitle to shortcodes
- How to Delete Posts by title?
- Display function from functions.php in tag.php
- AJAX values converted to PHP Variables?
- Custom Post Type Search
- Problem with removing characters “<” – WpAllImport