custom pages are not restricted
-
Dear All,
although I am using the Page Restrict plugin (2.2.0), it does not matter if I use “All” as restriction method (in the plugin settings) or “Selected” and simply select the pages I want to restrict.
If I use “All” or “Selected” and make sure that the page “Foo Bar” is selected, but I made a custom page
page-foo-bar.php
in my themes-folder, apparently the settings for Page Restrict will be ignored.Is this expected behaviour? Even though I make sure that the custom page uses
<div class="content">...</div>
?Currently I solved the issue by adding the following code at the top of each custom page:
<?php if (!is_user_logged_in()) { header("Location: ".get_bloginfo('url')); exit; } ?>
As such, any time a not-loggedin user will be redirected to the root of my WordPress-site where the login form will be shown.
Is this a correct way of solving this issue, of am I mis-using the plugin?
Thank you, kind greetings and best Christmas-wishes,
Wim
- The topic ‘custom pages are not restricted’ is closed to new replies.