Member Site – Always Sends Me Back To Login

You are using an undefined variable in your code ($padeid), it can be causing you problems. Try this code instead: add_action(‘template_redirect’,’wpse16975_check_if_logged_in’); function wpse16975_check_if_logged_in(){ global $wp; if( ! is_user_logged_in() ) { $url = wp_login_url( site_url( add_query_arg( array(), $wp->request ) ) ); wp_redirect( $url ); exit; } }

Restrict content even to specific user

You´ll need to save some metadata for the user, possibly in two fields, like member_from and member_until which will hold your issue numbers. In your “issue view”, check whether the current issues number is between the values of those fields. If that´s the case allow access, otherwise show some “meh, no access” or “buy access” … Read more

Using a page-template to restrict access based on IP (Frontend)

Now I have it working! In the meanwhile Jeff Cohan also gave the right advice on how to do it (see his comment on the question). Here’s my full code, working the way he suggested: function getUserIP() { $client = @$_SERVER[‘HTTP_CLIENT_IP’]; $forward = @$_SERVER[‘HTTP_X_FORWARDED_FOR’]; $remote = $_SERVER[‘REMOTE_ADDR’]; if (filter_var($client, FILTER_VALIDATE_IP)) {$ip=$client;} elseif (filter_var($forward, FILTER_VALIDATE_IP)) {$ip=$forward;} … Read more

Restricted images only for logged user. (hidden url)

Been done before You should take some time to research your issue here and be sure to read the site help topics especially How do I ask a good question? We’d love to help you. To improve your chances of getting an answer, here are some tips: https://wordpress.stackexchange.com/help/how-to-ask Find Answer Here How to Protect Uploads, … Read more

Segregating content in a blog for 2 different readers

If you are speaking about widgets – then you can use plugins like widget logic where you can easily create rules for displaying widgets. Let say your posts are separated into 2 categories – interactive functions and mathematics. Then you can create two different widgets displaying the latest post for the two different categories and … Read more