It looks like you’re addressing me 😉
If you want to modify this code snippet:
add_action( 'wp_logout','go_home' );
function go_home(){
wp_redirect( home_url() );
exit();
}
you can replace the home_url()
part with your custom page URL:
'http://example.com/landingpage/'
but I wouldn’t recommend hardcoding the landing page, if it’s an internal page.
You can try to construct the landing page with various WordPress functions:
You have for example get_permalink()
and extra input parameters to home_url()
. Then there’s get_category_link()
, get_tag_link()
, get_post_type_archive_link()
, … etc.
If you explain what kind of landing page you have in mind (page, post, archive, custom, external) then I can expand it further.
Related Posts:
- Logout redirect to home page
- How to change the default logout link on WordPress Admin
- handling login/logout redirects
- wp_logout_url() redirects to confirmation page even with nonce?
- Redirect user after logout
- After logout browser’s back button into twenty sixteen theme profile
- Logout without confirmation and SAME window on mobile
- How to redirect logged out users to specific page?
- How to redirect returning users who previously logged in?
- Conditional redirection with logout
- Custom, conditional redirect on logout
- Logging back into WordPress after logging out and having issues with ‘loggedout=true’ in redirect URL
- after logout, get_current_user_id still holds value
- Redirect Restricted Page to 404
- Redirect user to original url after login?
- Redirect to dashboard after login
- Make a video post redirect to next post after completion
- Redirect blog page to latest post?
- WordPress site redirects to different wordpress domain on the same server after reuploading db backup
- WordPress Redirect based on the prescence of a cookie
- Links to an exisiting Page are now redirecting to a draft page?
- Random and Erroneous WordPress Redirect
- Redirect Old domain & posts to new domain homepage
- Redirecting users to referrer page after logging in using custom login form
- Remove lost password form and URL
- add_rewrite_rule to pass entire path as a single parameter
- What is the wordpress way of displaying local external content?
- How To Only Allow Users To View Their Own Buddypress Profiles? [closed]
- Menu links only using http after enabling https, unable to redirect http links
- some url does not redirect from http to https
- Why can’t I access files / directories outside of wordpress
- Return to where the user was, after log out
- Redirect the non-www version of the site to the www
- Load time cost of using a redirect plugin v direct .htaccess entry
- How to pass email values from one php page to another
- How to redirect after login getting a variable from url (for example with the language)
- How to set 301 redirection after moving WordPress blog?
- How to include error message on login
- How to use a custom domain?
- Changing siteurl and homeurl – internal links redirect to home page?
- WooCommerce unexpected behavior [closed]
- Force WordPress to load from site’s hostname
- redirect Login problems
- How can I force the user to log in, even if they’re already authenticated?
- 301 redirect instead of 404 when URL is a prefix of a post or page name?
- Redirect users after register (first login) and force submit post
- Some admin pages redirecting to front page on save
- How to pass a message using template_redirect
- .htaccess 301 redirect conflict with plugin “WordPress Https”
- Disable WordPress URL auto complete
- How do I put up a splash page and have all WordPress links redirect to this page?
- How can I disable author pages without 301 redirects?
- Stop forcing certain paths to end with a forward slash
- Redirection on Custom page
- How do I redirect users after submitting a topic for moderation?
- Direct iPhone visitors to different stylesheet?
- 301 redirect any RSS feed on level up url
- Redirect loop with similar URLs
- Why does WP HTTP API switch the method (POST/PURGE) to GET when redirecting (302)?
- Redirect user to specific link after login
- 301 redirect via htaccess rules on the new site
- WordPress Domain redirects to different host
- Change the domain url?
- After retrive password, redirect to index page
- Change Category Slug Redirection
- custom login form redirect problem
- WordPress redirect to new domain name
- Blog post is redirecting to home page
- Bulk redirect all post
- Disable redirect to homepage after successful Login, Stay on Current Page
- WordPress no permission redirection to a popup
- Open wordpress page in directory the way index.html would open
- How force WordPress redirect to current custom page after login
- Redirect Homepage to another page when user login
- Site using static homepage, redirects (301) and removes pluses from query string
- Unusual Apache2 Error Causing WordPress Redirect Error?
- Determine user destination on wp-login.php
- 301 Redirect Loop www to non-www – Nginx + Apache2
- how to redirect 404 to attachment.php?
- 301 Redirect in WordPress not working in htaccess
- Toggle Redirect Function On/Off With Checkbox
- My wordpress site has “https://” on it but when I go to Dashboard and click visit site, it removes the “https://”
- After disabling Multisite, homepage redirects to non-existing page
- redirect to https://my-site/wp-admin/ instead of https://my-site/wordpress/wp-admin/ after options updating
- Redirect after login when WordPress in subdirectory
- How to redirect non-admin/editors from specific pages?
- How to make a redirect link in wordpress?
- wp_redirect leading to an infinite loop
- Redirect after Permalink change – What regex do I use?
- Configure WordPress to listen on a port other than 80
- Redirect based on $_GET parameters
- redirect users to the login page
- Moving an ASP Site to WordPress – Looking for Help on Redirects
- WordPress subfolders htaccess bypassing the root htaccess RewriteRule
- Stopping media file redirects
- Regex for pdf’s – Old .asp Site folder structure to new WordPress Media Folder(s)
- Redirect if a user has not written a post
- Create a custom redirect link that tracks the first visited page and after submitting form goes to first page using formidable forms plugin? [closed]
- WordPress not use site url when redirect 301
- Redirect certain 404 pages to parent page