Protect pages and categories with login using a shortcode.
This plugin protects pages and categories with login using a shortcode.
For page protection add a shortcode on the content and it will be prompted to login in order to view the content. After login user will be redirected to the requested page.
For category protection add a shortcode on the cetgory description and it will be prompted to login in order to view the category contents. After login user will be redirected to the requested category page.
You may also want to display a certain category or page depending on the user’s roles. In the case of pages the content displayed will be replaced with the text “NOT ALLOWED”, while in the case of categories the user who does not have the indicated role will be redirected to the homepage.
Note: Feel free to translate this plugin in your language. This is very important for all users worldwide. So please contribute your language to the plugin to make it even more useful. For translating I recommend the “Poedit Editor”.
Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of “Protect pages and categories with login”, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.
In the search field type “protect page and categories with login” and click Search Plugins. Once you’ve found our plugin you can view details about it such as the the point release, rating and description. Most importantly of course, you can install it by simply clicking “Install Now”.
protect-page-and-categories-with-login
folder to the /wp-content/plugins/
directory or install via zipJust add [sp4ppcl_protect_page_with_login] to the page content.
Just add [sp4ppcl_protect_page_with_login] to the category description.
Just use [sp4ppcl_protect_page_with_login role=”[ROLE_TO_ENABLE]”] shortcode to enable the view for setted user roles.
To enable more than one role use ; (semicolon) as separation char. Ex. [sp4ppcl_protect_page_with_login role=”author;subscriber”]
Probably there are content associated with multiple category and one of that isn’t protected.