Access plugin lets you control what sections different user roles can reach in the WordPress admin and on the front-end. You can create your own custom roles and choose exactly what administration capabilities they have on the site.
When you ask for help or report issues, make sure to tell us the roles that you want to create and the desired capabilities of these roles.
Problem: I have used Access to hide posts from Guest users, but I would can still see post information in search results. I would like to hide this information from Guest users.
Solution: A WordPress Archive is used to display search results. That archive is built in the legacy shortcode version, so you can use Access Control shortcodes in the archive's contents to suppress any visible information. The syntax is as follows:
[toolset_access role="Guest" operator="deny"]
Guests will never see anything inside this shortcode.
[/toolset_access]
If the archive is built using the Blocks Editor, you may use conditional blocks to achieve the same effect.
Problem: I have a custom role that should be able to submit a Form to add or edit a child post, but the parent post options are not shown in the select field in the Form. This was working before a recent update.
Solution: Check your custom code to confirm that redirects set up to block access to the back-end of the site are not applied to admin-ajax.php requests. Add some conditional logic to prevent those redirects as needed, like in the following code example:
/**
* Block wp-admin access for non-admins (not while doing AJAX, see https://toolset.com/forums/topic/custom-role-no-longer-able-to-perform-same-tasks/)
*/
function ace_block_wp_admin() {
if (!current_user_can('edit_users') && ( !defined('DOING_AJAX') || !DOING_AJAX ) ) {
wp_safe_redirect( '/my-account');
exit;
}
}
add_action( 'admin_init', 'ace_block_wp_admin' );