Add this to your header.php file.
if(!is_user_logged_in()) {
wp_die('This site is currently undergoing maintenance.');
}
You can replace This site is currently undergoing maintenance.
with whatever message you want to show.
Related Posts:
- Redirect website domain (including all pages) to external URL after Popup message (few seconds)
- How to add array [closed]
- WordPress website keeps loading the maintenance page
- Allow the access over wp-login.php
- PHP – redirect https to http and www to non-www
- Masking logout URL
- Logout/login redirect CSS issue
- Paged Single Post doesn’t redirect to the main url after Removing Pagination
- redirect wp-login.php to another page
- How do I redirect upon login a specific user based on role?
- Redirect if not logged in?
- Redirect a list of URLs to another URL, using functions.php
- is_user_logged_in not working to redirect only logged out users
- Ninja form Redirect depending on text field content [closed]
- Redirect specific page in WordPress for first time visit
- How do I redirect all 404 error url to Subcategory url
- Php function 301 redirect
- Stuck on maintenance mode
- How to Display Frontend CSS for Administrator only
- Redirect 404 page with ID in slug to associated page with same ID in slug
- 404 redirect to previous category
- Login Redirect if Logged in from Specific Page
- Redirect to another page if the user is logged in when pressing again the login button on menu bar
- Using wp_redirect and .htaccess to re-route searches (and pass along the remaining GET vars)
- Incorrect redirect after commenting
- Cannot modify header information – headers already sent (wp_redirect in functions.php)
- How i can put $_GET codes in function.php?
- Why does get_template_directory_uri() not include “www”, only for enqueued stylesheets?
- Page get parameter doesn’t work with is_single() function
- Contact Form 7 If Condition
- Solved: redirect to another page using functions.php
- Redirect to other page if login
- Logout Redirect and also WP-login.php Redirect
- Remove attachment page for audio media type only
- Redirects based on a JSON file
- template_redirect action only firing if logged in
- How to redirect Subscribers on login to specific page, when logging in from a Page
- Redirect to one of two pages after data submitted, depending on the current url
- Wildcard 301 Redirect Using Theme Function
- Competing Login Redirects – Need to be Combined?
- Postback redirect through add_action is not triggered
- Restrict access if logged out except for homepage
- Redirect specific author posts to another url
- Custom download page
- How to create a function to redirect a specified page to another page
- Language switcher for subdomains
- A blank page is shown after I add a Function
- How to request login for user but not for bots
- Template Redirect Function Only Working When Logged In
- Disable Attachment Page Except for Category
- Redirecting after login except for a specific page
- Processing data and redirecting with query string
- How to redirect using a custom wordpress api endpoint after form submission?
- Add custom css file after plugin css with WordPress Child Theme functions.php
- Redirect User Role When on Specific Page
- Keep the old referrer after failed login
- WP_Query for Attachments not working as expected
- Undefined variable issue for wp_get_attachment_image_url
- Customise the WordPress gallery html layout
- How to force one script to load before google tag manager script
- Change class woocommerce on function.php
- Text replace for the whole body tag
- Bizarre Child Menu Issue on WP Site
- How to display my comment count in the wordpress admin bar?
- How to remove redirection
- Login cookies blocked after customizing hashing method
- Counting posts and trigger it [closed]
- Show ‘Add to Cart’ on Out of Stock products
- Combine page types and Custom Taxonomy in a functions.php command
- reWrite wp-content url to point on my cdn
- Implementing a multilingual WordPress site by installing several instances of WordPress and redirecting
- Order column custom date using pre_get_posts
- query_vars treat as single var from URL
- Running javascript without hooking wp_head
- Issue passing action class to nested function. Admin Columns
- Populate Product Regular Price with a calculated ACF Field Value
- Re-Direct ALL Users to the Home Page IF not logged in
- Header menu aligned right on all pages except for single-post page [closed]
- Can’t load assets
- Allow user select role in wordpress default registration without plugin
- Display link to category over featured image
- Does hook have an effect on increasing the page load?
- WordPress Lite/Light
- Adding a schema code to one specific page using functions.php file
- Put images in the media from url functions
- Paragraph spaces in email template function
- Multiples functions on customize_register?
- How to add HTML into error message
- Hide ‘add to cart’ when certain value in dropdown is selected
- Can I call a functions.php file from a different URL?
- Why does modifying the “read more” link remove the link class?
- Javascript file loads only on homepage, not on other pages (404 not found error)
- Add a word after the post url if it is within a specific category
- Is it possible to load recaptcha script only in url with fragment identifier (#)?
- Ajax Form Issues using Lightsail (AWS)
- page shows short code not output
- How to update an image attachment’s alt text from a custom field when saving a post?
- Can I use ‘Featured Image’ as a hero image and a thumbnail?
- How to Override Page Template if URL matches query?
- Probleme shortcode with list author