Try this: Paste it on functions.php
(not tested)
add_action('template_redirect', 'my_user_redirect');
function my_user_redirect(){
if(!is_user_logged_in()){ // only redirect use not logged in
wp_redirect( home_url( 'welcome' ), 301 );
exit;
}
}
Let me know if it worked.
Related Posts:
- Redirect loop when trying to login to /wp-admin/ [duplicate]
- Show newly added posts since last user login time /date
- Can’t access login screen, wp-login.php 404’s
- Unable to login + Redirect loop on mobile
- Split Content and Gallery
- Do I need to use The Loop on pages?
- the_content and wp_link_pages
- How can I custom order the results from wp_list_categories?
- Display all authors and their only one latest post
- Remove comma from last item output from loop
- as a shortcode within the loop?
- Page template not displaying
- How to show just private posts in loop
- How to paginate this custom loop? [duplicate]
- Can I use both a custom excerpt and a trimmed excerpt?
- Select data from database and list it in Loop (WordPress)
- How to get_template_part using AJAX?
- How can I modify the loop from a plugin without wiping out other filters?
- I’ve been out of the loop since 2.8. What did I miss?
- Loop first six posts in carousel, next eight in grid
- Complex query and posts pagination
- Infinite blog loop
- One custom loop with condition to check child posts
- Loop get_theme_mod
- Move sticky posts down in main loop
- Why only one post (and no pagination) on this variation of the loop?
- Loop in Related Posts WordPress
- Conditional query that displays on Woo product attribute pages
- Template structure
- How to inject posts from certain category on home page
- The Loop – mixed ASC and DESC order
- Filter the_posts doesn’t work on search page
- Custom Loop Using Shortcode in Custom Page Template
- Listing subpages title and content and styling the first iteration differently
- single.php – how to mark current page in the loop
- Cannot retieve the_content() and the_author() – both returning empty strings
- How to order by multiple fields using standard query_posts?
- Get 1 more post in loop
- How to get the excerpt for is_home() outside of the loop isn’t working
- Make loop alphabetical
- How to check if a product is purchased within the last 365 days before displaying something
- How do I get my loop.php to properly paginate?
- Custom loop ordering not working
- First archive page with a few posts
- Loop through ACF taxonomies and output associated posts
- How to get user ID’s from multiple usernames?
- How to display first post
- Pagination on custom post type on front-page.php
- get_template_part() Not Working in Loop
- get_delete_post_link() inside Loop stubbornly returns nothing
- Query posts only with actual text content (not including shortcode or images)
- CPT while loop not working
- Problem with Front-Page.php loading recent posts
- Comments_template doesn’t work
- Get markup for post without loading into the template
- Where to add offset?
- How to synchronize The Loop with the max post per page?
- How to add a byline to all the pages?
- How do i create a list-posts-page?
- Exclude posts based on an array
- Displaying member join date on page
- Ascending order has strange effects on wordpress loop
- Is file_exists() compatible with timthumb.php? [closed]
- List ALL posts by author on author archive
- get post images to link to external sources
- Using is_page_template inside loop
- How to show the last article in a different way in my blog?
- Can’t limit posts_per_page in loop
- Slug is changing when I use WP_Query in a metabox of a post
- How to execute a user loop with shortcode
- How to fix pagination for custom loops?
- Check to see if a field is within an array in twig
- Custom loop not working in singular.php, working in other pages
- Loop Posts Outside of WordPress Installation
- Strange problem with wp_get_attachment_image_src database (db) query count
- How to include posts from one category, into a separate category of posts?
- how do i make this loop work
- Archive sorted by month – separate
- Making a specific page wordpress compatable that is not index
- Humanmade | Custom meta box class: How to display a repeatable meta box group?
- Can’t print out returned value
- change the_content images for different sizes (Desktop, tablet, mobile)?
- Get query result before posts are displayed?
- WordPress Group By Problem
- display only parent replies count in index.php
- using the loop on a page
- Home page loop with pagination problem
- WooCommerce custom loop pagination on front page
- Eliminate duplicates in a foreach loop [closed]
- Tag custom loop show posts
- While loop inside another while loop
- Problem with ms-thumb-frame-selected class in Master Slider
- I want the first post on my home page to be lengthier than the rest (example included)
- Loop with Custom Post Type Taxonomies and Interstitial Code
- Question about custom plugin
- loop mix my child-category and parent-category
- Fix html inside a for loop [closed]
- How can you make it so the comment box shows on some pages or posts but not all?
- Insert multiple custom components after x-number of posts
- How can I create an entirely new, separate display of posts?