{"id":1655635,"date":"2020-06-09T14:52:33","date_gmt":"2020-06-09T14:52:33","guid":{"rendered":"https:\/\/toolset.com\/?post_type=course-lesson&#038;p=1655635"},"modified":"2020-11-18T13:56:24","modified_gmt":"2020-11-18T13:56:24","slug":"restricting-access-to-pages","status":"publish","type":"course-lesson","link":"https:\/\/toolset.com\/es\/course-lesson\/restricting-access-to-pages\/","title":{"rendered":"Restricting access to pages"},"content":{"rendered":"\n<p>To hide a page from visitors, you need to use the&nbsp;<strong>Post Groups<\/strong>&nbsp;feature of the&nbsp;<strong>Toolset Access<\/strong>&nbsp;plugin. <\/p>\n\n\n\n<p>You can group pages that need to share the same front-end access permissions. In this example, you can create a group called \u201cLogged-in users only\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bring pages under Access control<\/h2>\n\n\n\n<p>To add pages to Post Groups, our site\u2019s built-in &#8220;Pages&#8221; must  be under Toolset Access control.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Navigate to&nbsp;<strong>Toolset<\/strong> \u2192 <strong>Access Control<\/strong>&nbsp;and ensure you are on the first tab,&nbsp;<strong>Post Types<\/strong>.<\/li><li>Click&nbsp;<strong>Pages<\/strong> and check the&nbsp;<strong>Managed by Access<\/strong>&nbsp;option.<\/li><li>Make sure all checkboxes in the&nbsp;<strong>Read<\/strong>&nbsp;column are selected.<\/li><li>Click the&nbsp;<strong>Save<\/strong> button.<\/li><\/ol>\n\n\n\n<p>All pages of your site will now be available for visitors by default. Later, we will restrict access to certain pages by using Post Groups.<\/p>\n\n\n\n<p>The pages on your site are now managed by&nbsp;<strong>Toolset Access<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"d9b77705cbf7be68795addea8dee8988\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/03\/account-page-access-control-post-type.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/03\/account-page-access-control-post-type-500x429.png\" alt=\"\" class=\"wp-image-1556241\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Setting the access right for all pages<\/figcaption><\/div><\/figure>\n<\/div>\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Create a post group for pages restricted to logged-in users<\/h2>\n\n\n\n<p>Next, you need to create a post group. For example, you can name it \u201cLogged-in users only\u201d.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Go to&nbsp;<strong>Toolset<\/strong> \u2192 <strong>Access Control<\/strong>.<\/li><li>Switch to the&nbsp;<strong>Post Groups<\/strong>&nbsp;tab.<\/li><li>Click <strong>Add Post Group<\/strong> button to add your first group.<\/li><li>In the pop-up window that opens fill out the group name.<\/li><li>Use the search field to find the pages you want to hide from visitors and add them to the list.<\/li><\/ol>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"f5a422f38433decd974f4f10ee784f12\"><img decoding=\"async\" width=\"502\" height=\"381\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/03\/account-page-access-control-add-new-group.png\" alt=\"\" class=\"wp-image-1556311\" srcset=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/03\/account-page-access-control-add-new-group.png 502w, https:\/\/toolset.com\/wp-content\/uploads\/2020\/03\/account-page-access-control-add-new-group-300x228.png 300w, https:\/\/toolset.com\/wp-content\/uploads\/2020\/03\/account-page-access-control-add-new-group-150x114.png 150w\" sizes=\"auto, (max-width: 502px) 100vw, 502px\" \/><div class=\"tb-image-caption\"><figcaption>Creating a post group for pages restricted to logged-in users<\/figcaption><\/div><\/figure>\n<\/div>\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Set access permissions for the post group<\/h2>\n\n\n\n<p>After creating the post group, a table appears, with permissions that different user types have for this post group.<\/p>\n\n\n\n<p>You have to do two final things:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>In the <strong>Read <\/strong>column, uncheck the option for the <strong>Guest <\/strong>users.<\/li><li>Click the <strong>pen <\/strong>icon that appears. In the pop-up dialog, select what visitors will see instead when visiting pages in this post group.<\/li><\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"9076f8437308332da1960e595b43995c\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/06\/toolset-access-post-group-hide-from-visitors.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/06\/toolset-access-post-group-hide-from-visitors-500x421.jpg\" alt=\"\" class=\"wp-image-1655843\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Removing read access from visitors (guests) and selecting what to display instead<\/figcaption><\/div><\/figure>\n<\/div>","protected":false},"author":4341,"featured_media":1655877,"template":"","related-lesson":[8431],"class_list":["post-1655635","course-lesson","type-course-lesson","status-publish","has-post-thumbnail","hentry","related-lesson-access-control"],"_links":{"self":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/1655635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson"}],"about":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/types\/course-lesson"}],"author":[{"embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/users\/4341"}],"version-history":[{"count":1,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/1655635\/revisions"}],"predecessor-version":[{"id":1848667,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/1655635\/revisions\/1848667"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/media\/1655877"}],"wp:attachment":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/media?parent=1655635"}],"wp:term":[{"taxonomy":"related-lesson","embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/related-lesson?post=1655635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}