|
Blocking content for lower roles
Started by: Jo4nny8
in: Toolset Professional Support
Quick solution available
|
|
3 |
9 |
4 years ago
Jo4nny8
|
|
Relevanssi search results visible on front end
Started by: michaelM-30
in: Toolset Professional Support
Quick solution available
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.
Relevant Documentation:
https://toolset.com/course-lesson/using-toolset-conditional-block/
|
|
2 |
6 |
4 years, 1 month ago
michaelM-30
|
|
Custom role no longer able to perform same tasks
Started by: Chris
in: Toolset Professional Support
Quick solution available
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' );
|
|
2 |
12 |
4 years, 3 months ago
Chris
|
|
Give logged in user access to Media Library but no other admin areas
Started by: michaelR-26
in: Toolset Professional Support
Quick solution available
Problem:
The Media Library pop up show but they can't do anything.
Solution:
You need to enable AJAX in the custom codes, for example:
if($user_role === 'exhibitor' && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ){
Relevant Documentation:
|
|
1 |
2 |
4 years, 4 months ago
michaelR-26
|