-
AuthorPosts
-
October 5, 2023 at 3:10 pm #1421498
Hi,
is it possible that editors only see, move and add the custom elements to a page in ALB? All other content-/layout- and media-elements should be invisible. I thought this was possible but I cannot find the settings for this.
Thanks a lot!
ThorstenOctober 6, 2023 at 10:16 am #1421593Hey ThorstenFB,
Thank you for the inquiry.
There is no option for this out of the box. You only can lock the builder elements for non-admins by enabling the Lock Advanced Layout Builder option in the Enfold > Layout Builder panel, but this will also affect the custom elements.
Best regards,
IsmaelOctober 6, 2023 at 10:41 am #1421601Hi Ismael,
thanks for your reply.
But I I don’t want lock the custom elements, only the regular elements.
The custom elements should be available and customizable by editors – the regular elements not.It also would be great if it were selectable which elements are shown to editors.
Best regards
Thorsten- This reply was modified 1 year, 1 month ago by ThorstenFB.
October 7, 2023 at 12:06 pm #1421740Hi Thorsten,
What you are asking for would be considered out of scope of theme support unfortunately, but we’ll consider adding such a function to a future release of the theme.
Best regards,
RikardOctober 9, 2023 at 10:16 am #1421881Hi Rikard,
thanks for your reply. Of course, I understand this but I hope this function will be implemented at some point.
At the moment my customers (editors) either have too many or too few permissions to make changes to their sites.
That’s why this function would be great for me and maybe for other users too.All the best
ThorstenOctober 10, 2023 at 5:32 am #1421965Hi,
Thank you for your patience
Your only option for now is to use the avf_allow_drag_drop filter to adjust which user roles can interact with the builder elements. However, it’s still not possible to restrict access only for CET. Usage examples can be found in the following threads
// https://kriesi.at/support/topic/shop-manager-user-role-permissions/#post-1370646
// https://kriesi.at/support/topic/alb-does-not-work-with-user-role-editor/#post-1293830Best regards,
IsmaelMarch 4, 2024 at 12:19 pm #1436244HI Ismael,
many thanks for your reply. Sorry, I don’t understand it completely. But is it possible with hooks and filters to hide the whole element-tabs in ALB but let authors (f.e.) still have the possibility to drag and drop (move + copy) the elements they are already used on a site?
Best regards
ThorstenMarch 5, 2024 at 8:44 am #1436332Hi,
But is it possible with hooks and filters to hide the whole element-tabs in ALB but let authors
That might be possible. Please add this code in the functions.php file:
add_filter( 'admin_body_class', function( $classes ) { $user = wp_get_current_user(); $roles = $user->roles; $roles_string = implode( ' ', $roles ); return $classes . ' ' . $roles_string; }, 10, 1);
Then add this hook to hide the ALB element buttons for specific user roles.
add_action( 'admin_head', 'ava_custom_admin_css' ); function ava_custom_admin_css() { if ( current_user_can( 'administrator' ) ) { ?> <style> .administrator .avia-builder-main-wrap .shortcode_button_wrap { display: none; } </style> <?php } }
The hook above will hide the buttons for administrators. If you want to hide it for authors or editors, you have to adjust the css rule a bit.
.author .avia-builder-main-wrap .shortcode_button_wrap, .editor .avia-builder-main-wrap .shortcode_button_wrap { display: none; }
Best regards,
IsmaelMarch 5, 2024 at 12:41 pm #1436364Hi Ismael!
thank you so much!!! That’s what I’m looking for!
It helps me a lot. Perfect!!Cheers
ThorstenMarch 5, 2024 at 5:15 pm #1436392 -
AuthorPosts
- You must be logged in to reply to this topic.