{"id":253843,"date":"2025-10-04T21:09:28","date_gmt":"2025-10-04T21:09:28","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/role-based-content-restrictor\/"},"modified":"2026-04-27T19:26:03","modified_gmt":"2026-04-27T19:26:03","slug":"role-based-content-restrictor","status":"publish","type":"plugin","link":"https:\/\/cn.wordpress.org\/plugins\/role-based-content-restrictor\/","author":23372761,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3.0","stable_tag":"trunk","tested":"6.9.4","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"Role Based Content Restrictor","header_author":"Inzamam Abbasi","header_description":"Restrict single pages or posts by user role(s). Redirect users without the allowed role to a custom page (post meta) or to a global fallback configured in Settings.","assets_banners_color":"a8c6e5","last_updated":"2026-04-27 19:26:03","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/inzidev.com\/","header_plugin_uri":"","header_author_uri":"https:\/\/inzidev.com","rating":5,"author_block_rating":0,"active_installs":60,"downloads":703,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.2":{"tag":"1.0.2","author":"inzidev","date":"2025-10-04 21:16:47"}},"upgrade_notice":{"1.3.0":"<p>Major update introducing login-based restriction options and a new unified interface. Existing settings are preserved and automatically adapted.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":3},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3372960,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3372960,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3372960,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3372960,"resolution":"1","location":"assets","locale":"","width":1909,"height":912},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3516773,"resolution":"2","location":"assets","locale":"","width":1905,"height":887},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3516773,"resolution":"3","location":"assets","locale":"","width":1905,"height":889}},"screenshots":{"1":"Global settings page for default redirect configuration.","2":"Restriction Type selector with radio-based UI.","3":"Dynamic fields based on selected restriction type (roles, redirects, visitors-only settings)."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1912,529,1932,1914,248745],"plugin_category":[58],"plugin_contributors":[248746],"plugin_business_model":[],"class_list":["post-253843","plugin","type-plugin","status-publish","hentry","plugin_tags-access-control","plugin_tags-content","plugin_tags-membership","plugin_tags-restrict","plugin_tags-roles-based-content-restrictor","plugin_category-user-management","plugin_contributors-inzidev","plugin_committers-inzidev"],"banners":{"banner":"https:\/\/ps.w.org\/role-based-content-restrictor\/assets\/banner-772x250.png?rev=3372960","banner_2x":"https:\/\/ps.w.org\/role-based-content-restrictor\/assets\/banner-1544x500.png?rev=3372960","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/role-based-content-restrictor\/assets\/icon-128x128.png?rev=3372960","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/role-based-content-restrictor\/assets\/screenshot-1.png?rev=3372960","caption":"Global settings page for default redirect configuration."},{"src":"https:\/\/ps.w.org\/role-based-content-restrictor\/assets\/screenshot-2.png?rev=3516773","caption":"Restriction Type selector with radio-based UI."},{"src":"https:\/\/ps.w.org\/role-based-content-restrictor\/assets\/screenshot-3.png?rev=3516773","caption":"Dynamic fields based on selected restriction type (roles, redirects, visitors-only settings)."}],"raw_content":"<!--section=description-->\n<p><strong>Role Based Content Restrictor<\/strong> allows you to restrict access to individual posts, pages, and custom post types based on user roles or login status \u2014 now with a simplified and intuitive interface.<\/p>\n\n<h3>Key Features<\/h3>\n\n<ul>\n<li>Restrict content based on <strong>user roles<\/strong><\/li>\n<li>Restrict content to <strong>logged-in users only<\/strong><\/li>\n<li>Restrict content to <strong>logged-out users (visitors only)<\/strong><\/li>\n<li>Set a <strong>custom redirect page<\/strong> per post<\/li>\n<li>Configure a <strong>global fallback redirect<\/strong> from plugin settings<\/li>\n<li>Clean <strong>radio-based UI<\/strong> to avoid conflicting settings<\/li>\n<li>Fully <strong>backward compatible<\/strong> with previous versions<\/li>\n<\/ul>\n\n<h3>Improved Restriction UI<\/h3>\n\n<p>The plugin now uses a <strong>single \u201cRestriction Type\u201d selector<\/strong> instead of multiple toggles:<\/p>\n\n<ul>\n<li>No Restriction  <\/li>\n<li>Restrict access to this content for roles  <\/li>\n<li>Restrict to Logged-in Users Only  <\/li>\n<li>Restrict to Logged-out Users Only (Visitors Only)  <\/li>\n<\/ul>\n\n<p>Only relevant fields are shown based on the selected option, making configuration clearer and preventing conflicts.<\/p>\n\n<h3>Smart &amp; Conflict-Free Logic<\/h3>\n\n<p>The plugin ensures consistent behavior with a clear priority system:<\/p>\n\n<ul>\n<li><strong>Visitors Only<\/strong> \u2192 highest priority (logged-in users are redirected, except administrators)<\/li>\n<li><strong>Logged-in Only<\/strong> \u2192 restricts access to authenticated users<\/li>\n<li><strong>Role-based restriction<\/strong> \u2192 applies when selected<\/li>\n<\/ul>\n\n<h3>Visitors Only Behavior<\/h3>\n\n<p>When <strong>Visitors Only<\/strong> is enabled:\n- Logged-out users can access the content\n- Logged-in users are redirected to a selected page\n- If no page is selected, the plugin uses the post redirect or global fallback\n- Administrators are always allowed access<\/p>\n\n<h3>Backward Compatibility<\/h3>\n\n<p>Existing settings are fully preserved:\n- Older saved configurations are automatically mapped to the new interface\n- No data loss when switching between restriction types\n- Hidden fields are not submitted to prevent accidental overwrites<\/p>\n\n<p>Perfect for:\n* Membership sites<br \/>\n* Learning Management Systems (LMS)<br \/>\n* Intranets and company portals<br \/>\n* Client dashboards or gated content areas<br \/>\n* Login \/ Register pages (visible only to visitors)<\/p>\n\n<p>Lightweight, developer-friendly, and works with any theme or builder (Elementor, Gutenberg, etc.).<\/p>\n\n<h3>About the Author<\/h3>\n\n<p><strong>Inzamam Abbasi<\/strong> \u2013 Professional WordPress Developer with over 10 years of experience, specializing in <strong>custom plugin development<\/strong> and scalable WordPress solutions.<br \/>\nDelivered 1,000+ projects including membership systems, LMS platforms, and enterprise WordPress solutions.<\/p>\n\n<p>Learn more at https:\/\/inzidev.com<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/role-based-content-restrictor\/<\/code> or install directly from the WordPress Plugin Directory.<\/li>\n<li>Activate the plugin from <strong>Plugins &gt; Installed Plugins<\/strong>.<\/li>\n<li>Go to <strong>Settings &gt; Role Restrictions<\/strong> to configure the default redirect.<\/li>\n<li>Edit any page\/post and use the <strong>Restrict Access<\/strong> meta box to:\n\n<ul>\n<li>Select restriction type<\/li>\n<li>Configure roles (if applicable)<\/li>\n<li>Set redirect behavior<\/li>\n<\/ul><\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"will%20it%20work%20with%20custom%20post%20types%3F\"><h3>Will it work with custom post types?<\/h3><\/dt>\n<dd><p>Yes! The plugin works with all public post types registered in WordPress.<\/p><\/dd>\n<dt id=\"can%20i%20restrict%20pages%20to%20only%20logged-in%20users%3F\"><h3>Can I restrict pages to only logged-in users?<\/h3><\/dt>\n<dd><p>Yes, select \u201cLogged-in Users Only\u201d from the restriction type.<\/p><\/dd>\n<dt id=\"can%20i%20restrict%20pages%20to%20only%20visitors%20%28logged-out%20users%29%3F\"><h3>Can I restrict pages to only visitors (logged-out users)?<\/h3><\/dt>\n<dd><p>Yes, select \u201cVisitors Only\u201d. Logged-in users will be redirected automatically.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20multiple%20restriction%20types%20were%20previously%20enabled%3F\"><h3>What happens if multiple restriction types were previously enabled?<\/h3><\/dt>\n<dd><p>The plugin automatically resolves them into a single restriction type using a priority system, ensuring consistent behavior.<\/p><\/dd>\n<dt id=\"can%20i%20redirect%20users%20to%20an%20external%20url%3F\"><h3>Can I redirect users to an external URL?<\/h3><\/dt>\n<dd><p>Not yet. You can redirect them to a page where you handle the external redirect using a script or shortcode.<\/p><\/dd>\n<dt id=\"does%20it%20support%20multiple%20roles%20per%20page%2Fpost%3F\"><h3>Does it support multiple roles per page\/post?<\/h3><\/dt>\n<dd><p>Yes, when using role-based restriction, you can select multiple roles.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20no%20redirect%20page%20is%20set%3F\"><h3>What happens if no redirect page is set?<\/h3><\/dt>\n<dd><p>The plugin will use the global fallback page set in the plugin settings. If that\u2019s not set, users are redirected to the homepage.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Added <strong>Logged-in Users Only<\/strong> restriction option.<\/li>\n<li>Added <strong>Visitors Only (Logged-out Users Only)<\/strong> restriction option.<\/li>\n<li>Introduced <strong>radio-based restriction UI<\/strong> for cleaner and conflict-free configuration.<\/li>\n<li>Implemented <strong>priority-based restriction handling<\/strong> (Visitors Only \u2192 Logged-in \u2192 Roles).<\/li>\n<li>Improved meta handling with full backward compatibility.<\/li>\n<li>Prevented accidental data overwrite using conditional field saving.<\/li>\n<li>Enhanced admin UI with dynamic field visibility.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Confirmed compatibility with WordPress 6.9<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Minor fixes for submission and compliance with WordPress.org guidelines.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Improved compatibility with WordPress.org guidelines.<\/li>\n<li>Updated text domain and folder structure.<\/li>\n<li>Minor code cleanups.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial public release.<\/li>\n<\/ul>","raw_excerpt":"Restrict access to pages, posts, and custom post types by user roles or login status with a clean and conflict-free interface.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/253843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=253843"}],"author":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/inzidev"}],"wp:attachment":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=253843"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=253843"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=253843"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=253843"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=253843"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=253843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}