Is there a way to load pages/site from specific referring source only?

My preferred option is a quick-and-dirty, though very common, solution. The vendor has a “Support” page that contains limited “public” information. However the page includes a user “sign in” option so that authorised users can access all the “private” data that you have concerning your product. This page can be accessed via the public website … Read more

Administrator cannot see private content

Private Content Private content is published only for your eyes, or the eyes of only those with authorization permission levels to see private content. Normal users and visitors will not be aware of private content. It will not appear in the article lists. If a visitor were to guess the URL for your private post, … Read more

Assign a username and password to specific users

Yes, there are several possible ways to do this. The easiest method is probably to use Basic HTTP Authentication using a .htaccess and .htpasswd file. Here’s a site that will generate these for you. You can create separate usernames/passwords and then drop these files in the private folder. There are several guides and tutorials for … Read more

Hide public page from logged in users?

You can create a page template to check if user is loggedin. And if it does then redirect user to website homepage (configurable), otherwise show page content. This is the simple condition you can use to check if user is loggedin. <?php if ( is_user_logged_in() ) { wp_redirect( home_url( “https://wordpress.stackexchange.com/” ) ); exit; } else … Read more

Private pdf files

Your approach does not provide security. I could hand-craft a cookie named “wordpress_logged_in” (containing any arbitrary value) and have access to your PDF files. You may want to rethink your solution to put a PHP script in between the files and the users. e.g. User Clicks download button PHP Script handles fetching document If authenticated … Read more

Change Visibility to Private

You were pretty close. You just want to hook in at the right time when the comment is being saved. This is untested but should work. add_action( ‘comment_post’, ‘wpse_make_private_after_3_comments’, 10, 2 ); function wpse_make_private_after_3_comments( $comment_ID, $comment_approved ) { $comment = get_comment( $comment_ID ); $post_ID = $comment->comment_post_ID; $comments = wp_count_comments( $post_ID ); // You could also … Read more