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_login_form display no styled form
- 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?
- Simple way to make most of my site private
- Redirecting after login except for a specific page
- Can You Set A Minimum Image Dimension For Resizing Images?
- How to create an array if ’empty’?
- wp_title() return random number
- Problems adding a new field to product in cart
- Auto Resize embedded videos player
- blank page with wp_get_attachment
- How to add javascript code into Divi child theme?
- Can site visitors view functions.php file?
- Parent category as WOOCommerce Categories widget title
- how to use auth_redirect() redirect visitor to login page if they are not login when they click account and order page?
- Woocommerce Display Discount On cart
- Check for $ _POST fields in a POST method form
- Getting value of variable from functions.php and debugging it
- Problem with my footer after changing WooCommerce Products Sorting [closed]
- Limiting WordPress Search function : Custom build
- Scheduled post delete – can’t pass the cron arguments
- How to show only specific category post by user role without plugin and restrict all other cats
- Why does echo on functions.php not yield result in source code?
- Wildcard 301 Redirect Using Theme Function
- Child theme remove parent filter in functions
- Changing the default view of “The Events Calendar” for mobile
- Child theme, how to cut the functions.php file into several classes?
- Set URL Parameter Post Layout As Default
- Styling WordPress login page – Can I change the markup on the login page?
- Why does my wp_enqueue_script() only insert the script for logged in users
- Modify content inside post before first publish
- Shortcode to output category description by passing ID
- Exclude admins from query get posts
- Pass an argument into a function to extract from array
- some profile informations like youtube link doesnt seem
- How do I make a custom “Read More Blogs” button for my blog page
- function class doesnt work
- I am trying to set post terms to a custom taxonomy
- Help using ShortCodes to style whole chunks of the post
- Extend WordPress Audio Widget to accept HLS (.m3u8) URLs
- I’m creating a online store for my website, my aim is to add description to products in home page only how can i achieve it?
- how to increase connection time
- Shortcode to insert default text and change one word throughout it?
- get_locale() is different from $locale
- If click on Save/Publish change Post Status to Pending Review instead Publish
- modifying every other element’s class inside while loop
- Adding Custom Body Class for Page: Shop
- Its my first time trying to create a website , I got an error Please help
- Refresh page after login with litespeed cache
- How can I automatically delete comments that contain a URL?
- Run function for specific user only
- Pass post ID from archive template to functions file
- Replace theme function
- Competing Login Redirects – Need to be Combined?