Put code below into your theme’s functions.php:
add_action( 'template_redirect', function() {
is_user_logged_in() || auth_redirect();
});
function fpw_custom_login_message() {
$message="<p style="text-align: center">Until this site goes public you need to be registered to see the content<br /> </p>";
return $message;
}
add_filter('login_message', 'fpw_custom_login_message');
Related Posts:
- What Plugins Demonstrate Great WP Plugin Development? [closed]
- How to custom crop each image size?
- WordPress 3.5 Media Manager – add a button
- Pluggable function and activation check?
- fatal error get_page_permastruct()
- Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import – How?
- Why am I sometimes getting a 404 error when I try to update a page with Elementor?
- delete_user_meta Delete one value out of array
- How can I ‘reactivate’ .PHP files within a WP plugin that have been marked ‘inactive’?
- How to include DW Question & Answer plugin in front page template?
- Distributing and packaging plugins
- Dashboard Widget Form
- Changing image URLs in media library
- Where to place custom functions?
- Advanced Custom Fields/User Role Editor – how to hide ACF for certain users?
- Checking that the Rewrite API is available
- How to achieve certain page (url) accessible to certain users
- Serve different files depending on OS/Browser
- How to make a PDF/Document library [closed]
- Plugin upload to install
- WordPress repository forbids me call wp-load.php in non-WordPress file
- Bulk edit WP posts to update embeded images with new alt tags
- How to fetch form data and show it to my page?
- Plugin can not display in my custom theme
- How do I show a different homepage to logged in and non-logged in users?
- Check if SEO plugin installed
- Enqueue stylesheet in plugin for wp-login.php
- WordPress override archive page template using a plugin
- How can i delete options on plugin uninstallation?
- Date format – Meta Box plugin
- autologin in wordpress when loged in non wp-site
- Image crop, resize and compression plugin?
- How to Include File from Plugins into Template?
- List category posts displaying limited posts
- Woocommerce Coupon Menu and Marketing Menu missing After “Coupons can now be managed from Marketing > Coupons.” [closed]
- “uagb/section and uagb/columns block”
- How to remove menus items from Menu section from WordPress theme customizer
- Block installation of specific plugins on a server level (CentOS 6 x64)
- Is there a way to easily manage Project options (custom-fields)
- Form Plugin for Api Requests which is used via Shortcode
- “Allowed memory size” problem [closed]
- count the number of views of a post excluding own views
- rewrite file to wordpress
- WordPress Url setting
- When Installing a Plugin Where do I Move Template Files to?
- What would make the plugin update process to complete but don’t report as such?
- AZindex related help needed
- WordPress slider that allows image, headline, text, and button?
- Contact Form 7 is not redirecting the “Thank-You” page with the removal of CSS and JS of plugins
- WordPress search input in database, to edit information via form and update the database
- Remove a div class with condition
- How Can I Increase Breadcrumb Position Count (Starting From 2)?
- BS Authorize.net Problem (Payment in hanging if customers is not logged in)
- PHP Error message Upload images to remote server
- Better search on WordPress.org Plugins?
- Avoid duplicate posts with xml rpc
- No route was found matching the URL and request method
- WP_get_image_editor resizing images in a foreach loop
- WP core and plugin updates fail AWS
- Load my Inline js footer area
- CMB2 Output Select Box Chosen Option
- Custom product page’s style for printing
- Remove action added in plugin class from theme
- wc_get_product_terms() throws “Notice: Undefined offset: 0”
- Use WordPress Site For Email List Functionality
- Function get_locale always returns en_US in plugin?
- How to add subdomain to htaccess
- Create a two column content
- Can’t get or display post thumbnail in wordpress
- Custom User Notice Upon Login
- How to validate field when create post
- Keeping original URL
- How to publish adobe edge animation to custom wordpress plugin
- Adding an onchange event to a custom dropdown menu in WordPress
- How to add jquery to my custom post type wp plugin
- WordPress list child pages of custom post type
- Update post meta not working on wp_postmeta
- Slow WordPress admin panel with a total query time of 1664ms
- Contact Form 7: custom validation [closed]
- Adding a Filter to Sidbar Login Plugin to Change Login Button Lable
- Trouble Removing Plugin [closed]
- Output plugin post like system count [closed]
- How to develop an extension for a simple form post and post back? [closed]
- Hide Pages WooCommerce [closed]
- What can I do to customize a widget provided with this plugin? from where have I to start?
- Javascript as Jquery Function Call?
- Shortcode inside a redirect [closed]
- Attachement title in wpallimport
- Block registration with viewScript
- I want to include My theme file (testing.php) to inside my plugin folder (myplugin/mypugin.php)
- How do I set register_meta for a specific CPT?
- How to Enfroce Domain Licensing Limits? [closed]
- Override plugin constant using a theme
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Update Content for a Custom Block Toolbar Button
- WordPress menu dissapear when I add a parameter to custom post archive
- Submitting form to admin-post.php WordPress
- WordPress Throwing Deprecated Errors on its own Files
- Changing slug when post is copied
- Show the author only own types of publications. (JetEngine, Elementor)