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

How restrict video to be open on direct url hit

You need to create a .htaccess file in order to block the file access from direct url entry. The below code should work for you. RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourwebsite\.com/ [NC] RewriteCond %{REQUEST_URI} !hotlink\.(gif|png|jpg|doc|xls|pdf|html|htm|xlsx|docx|mp4|mov) [NC] RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC] RewriteRule .*\.(gif|png|jpg|doc|xls|pdf|html|htm|xlsx|docx|mp4|mov)$ http://yourwebsite.com/ [NC] There is also a previous post on this in the WordPress Stack … Read more