Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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.
    #489024

    Hi 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,
    Elliott

    #489044

    Hi,

    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

    #489110

    Hi!

    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!
    Elliott

    #489132

    The 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>';
    }
    #489422

    Hi,

    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,
    Rikard

    #490004

    Hi I tried the above CSS but it didnt work. Should i use it in de child css or somewere else?

    #490255

    Hey!

    Send us a WordPress login and we’ll take a look.

    Cheers!
    Elliott

    #491311

    Hi, 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.
    #491981

    Hey!

    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!
    Ismael

    #492073

    Hi, 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.

    #492610

    Hi!

    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

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.