You can use template_redirect action to redirect Specific users based on your terms.
This action hook executes just before WordPress determines which template page to load. It is a good hook to use if you need to do a redirect with full knowledge of the content that has been queried.
You can use is_page function to check weather the current page is in your list of pages or not.
add_action( 'template_redirect', 'redirect_to_specific_page' );
function redirect_to_specific_page() {
if ( is_page('slug') && ! is_user_logged_in() ) {
wp_redirect( 'http://www.example.dev/your-page/', 301 );
exit;
}
}
Related Posts:
- When I change slug, will WordPress create redirect from the old URL?
- Why is WordPress redirecting from http to https on a local environment?
- Why am I getting a 301 on a existing post?
- Non-WordPress page in subdirectory under WordPress page
- Keeps on redirecting on my development copy
- Password change when the user login first time
- Custom login form redirect to external site
- Clarification on auth_redirect()
- Exclude a path from WordPress using .htaccess redirects (Apache)
- Restrict Access to wp-login.php
- Redirect to custom URL after registering from a page with registration form
- Stop unwanted WP redirection to new url
- Problem to redirect custom page using htaccess
- WordPress within a subdirectory of another WordPress environment doesn’t work
- WordPress Customizer: custom redirection after closing
- Website redirecting to old domain name
- How to do 301 redirect to Sub page using htaccess file?
- Redirect feed to 404 page
- Does WordPress automatically redirect url without parent slug?
- Deny access to a path (give 403 or 404 response)
- Redirect home to another page with htaccess
- How do I redirect /search/ to ?s=
- 301 Redirect Loop
- Infinite loop behind SSL proxy on non-standard port
- Redirect from home page to post list page?
- set up 301 redirect within wp-content/uploads/ directory of a WP site to a new image URL
- How to redirect user after login to a specific page?
- .htaccess rule to redirect old URLs to new structure [closed]
- .htaccess Redirect
- Redirect when accessing /login when logged in
- Built-In Postname Redirection vs Hard Redirects in relation to SEO and performance
- Local Environment Stripping Port Number…help tracking down the redirect?
- User is logged in after Stripe payment, then redirected, but is then logged out again
- How To Fix A Redirect Chain
- Redirect “http://old.net/category/postname” to “https://new.com/postname”?
- Image URLs not redirecting properly
- After logout browser’s back button into twenty sixteen theme profile
- 301 Redirect Old URL to New WordPress Page
- Login Redirect – Multiple Scenarios
- URL masking of subdomain to main domain using .htaccess
- Redirect outside WP after login
- Redirecting from wp-content?
- Redirect non existing page to frontpage
- How do I do a redirect to WordPress permalink with post id via htaccess?
- WP page 404 error only on mobile
- Redirect user on first visit based on geographical location
- Create a permalink to a pdf?
- My site doesn’t redirect from HTTP to HTTPS
- Bedrock WordPress
- Redirect one domain to another
- Only execute function if SSL is set up properly
- How to redirect wp_login_form to new page after user loged in?
- Redirect User to login page
- How do I Redirect Tags from Old Joomla Site to New WordPress Site?
- How to redirect user after login to the page called by his first name?
- Redirect after get_delete_post_link
- Whenever I try to publish a post in wordpress, I always get redirected to the installation page…why?
- Is it possible to detect if a POST action is for a “Save Post” before the save_post action?
- Login redirect to previous page
- Disable and Hide WP-JSON
- URL redirection
- Redirect when not logged and parametr in link
- Browsers Forcing Multisite to https
- Is it possible to change redirect template through a shortcode?
- Relink Drupal Permalinks “…node/XXXX” to wordpress Permalinks (e.g./audio/)
- Hide a Post everywhere except on redirect
- Keep the old referrer after failed login
- How to 301 redirect WP posts id “/c/94940894” to permalink with post name?
- Redirect user if they are logged in
- URL redirect regular expressions redirecting all after first viriable
- 301 Redirect Link to Media
- WordPress Redirect post to outside website based on useragent
- There is 1 redirect
- How to create mass 301 redirects with PHP in Nginx server without using a WP plugin
- HOW do you Redirect buddypress login to EDIT tab not PROFILE tab on profile page? [closed]
- WordPress redirects to backend when i’am not logged in
- Redirect to custom admin menu after plugin activation
- Redirect HTTP request to HTTPS request
- home page redirect loop after update to 4.8
- Woocommerce login to specific page or referrer
- 301 Redirects when change URL in WordPress database
- How can I redirect to another page with screen already at the bottom of the page?
- How is this URL being redirected?
- What’s the best way to redirect to a new wordpress website?
- Tag archive page not working
- 301 Redirect only for posts
- How to move a https website back to dev and access the admin?
- Why is WordPress redirecting to homepage after GET form submit?
- Redirect after user changes password
- Custom Form Redirects to Post after Submit
- Plugin redirects URL structure using 301 redirect. Time to disable the plugin?
- URL is redirecting (301) when query string is passed through URL
- Plugin html-on-pages: URL not redirecting
- Hide page for user logged and redirect for profile? [duplicate]
- Redirect a WP to another with all URL
- Redirect ignore last URL segment
- Creating custom link that redirects to a another link
- Other pages fine but wp-admin showing ERR_TOO_MANY_REDIRECTS Error
- Redirect if a user has not written a post
- Redirect certain 404 pages to parent page