-
AuthorPosts
-
August 17, 2015 at 1:10 pm #488869
Hi,
First of all i would like to thank you guys for the theme it is awesome! I have a question. I want to give a client the ability to edit the text and photo’s of a enfold site but not to add elements. So basiically i want the user role: “Editor” to be able to Edit the pages via de avia layout but i want to delete the “layout elements” “content elements” and “media elements” for this user. Is that possible? I couldnt find it on the forum
Thanks in advance!
p.s. If i can delete them using CSS i’m also happy I just don’t want the client to add /change more then text and video.
- This topic was modified 9 years, 3 months ago by vonwelzen.
August 17, 2015 at 5:12 pm #489024Hi vonwelzen!
We could give you CSS to hide it for all users. To hide it for a certain user or user role you would have to do some editing to the PHP though and it’s kind of bordering on custom work. Perhaps by using this you can check if the user is an editor or not, https://codex.wordpress.org/Function_Reference/current_user_can.
Regards,
ElliottAugust 17, 2015 at 5:42 pm #489044Hi,
Thanks for your reply. Oke then i will remove it for all users and enable it when i want to make changes. Could you provide the proper css for me ?
Thanks in advance
August 17, 2015 at 8:33 pm #489110Hi!
If your not using a child theme then download one here, http://kriesi.at/documentation/enfold/downloads/, and then add this to the functions.php file.
add_action( 'admin_menu', 'enfold_customization_admin_css' ); function enfold_customization_admin_css() { echo '<style type = "text/css">'; echo '#avia_builder { display: none; }'; echo '</style>'; }
And when you want to do some editing you can edit the file in Dashboard > Appearance > Editor and switch this line.
add_action( 'admin_menu', 'enfold_customization_admin_css' );
To this.
//add_action( 'admin_menu', 'enfold_customization_admin_css' );
Cheers!
ElliottAugust 17, 2015 at 9:04 pm #489132The code doesn’t seem to work when I paste this in the editor. I also used some different code but this couldnt be conflicting right?
all code in child theme functions:
add_theme_support('avia_template_builder_custom_css'); add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Cookie'] = 'Cookie'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Cookie'] = 'Cookie'; return $fonts; } add_action( 'admin_menu', 'enfold_customization_admin_css' ); function enfold_customization_admin_css() { echo '<style type = "text/css">'; echo '#avia_builder { display: none; }'; echo '</style>'; }
August 18, 2015 at 12:11 pm #489422Hi,
You can use the following CSS to hide the both buttons to the ALB, I think that should do:
#postdivrich_wrap, #mceu_15-open { display:none !important; }
Thanks,
RikardAugust 19, 2015 at 12:57 pm #490004Hi I tried the above CSS but it didnt work. Should i use it in de child css or somewere else?
August 19, 2015 at 5:27 pm #490255Hey!
Send us a WordPress login and we’ll take a look.
Cheers!
ElliottAugust 21, 2015 at 12:24 pm #491311Hi, In the private content there is a login to the Admin eviorment. Could you also take a look at the media gridview because after updating i get an error while uploading a photo and the gridview in media doesnt work. (oke the previous PHP code made the media gallery disapear so that problem is fixed :) )
Thanks in advance
- This reply was modified 9 years, 3 months ago by vonwelzen.
August 24, 2015 at 3:04 am #491981Hey!
I think you forgot the url to the website. Please post it here. Try to replace the code with this:
add_filter('admin_head', 'avf_builder_button_params_mod', 10, 1); function avf_builder_button_params_mod($params) { $user = wp_get_current_user(); if ( in_array( 'administrator', (array) $user->roles ) ) { echo '<style type="text/css">#avia_builder{display: none !important;}'; } }
Cheers!
IsmaelAugust 24, 2015 at 10:50 am #492073Hi, Ismael,
Thanks for your reply. The code does work but it deletes all abbility to edit. I just want it to delete Layout elementes/Content Elements & MEdia elements. I found a way to dot it via avia builder CSS but with every update i have to manually set the css back. Could you help?
Thanks in advance.
August 25, 2015 at 5:42 am #492610Hi!
Replace the code with this:
add_filter('admin_head', 'avf_builder_button_params_mod', 10, 1); function avf_builder_button_params_mod($params) { $user = wp_get_current_user(); if ( in_array( 'administrator', (array) $user->roles ) ) { echo '<style type="text/css">.shortcode_button_wrap{display: none !important;}'; } }
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.