Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #495011

    Hello !

    I add the following code to my function.php of my child theme :

    add_action( 'admin_menu', 'enfold_customization_admin' );
    function enfold_customization_admin() {
    	echo '<style type = "text/css">';
    	echo 'a[href="#avia_sc_button_full"] { display: none; }';
    	echo '</style>';	
    }

    This work perfectly, the button is Hide. But when i want to upload a picture I have this error “An error has occurred while sending . Please try again later.”

    I don’t see where is the link between hidding button with CSS and uploading picture.

    But it’s a fact when i delete the function enfold_customization_admin the upload works perfectly.

    Perhaps I use the wrong Hook ?

    Thx for your help

    Regards

    #495035

    Hey leplusweb!

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

    Cheers!
    Elliott

    #495044

    Hey,

    thx

    Edit : I reupload the function.php with the code below

    add_action( 'admin_menu', 'enfold_customization_admin' );
    function enfold_customization_admin() {
    	echo '<style type = "text/css">';
    	echo 'a[href="#avia_sc_button_full"] { display: none; }';
    	echo '</style>';	
    }
    • This reply was modified 4 years ago by  leplusweb.
    #495637

    Hi!

    Please set the user to administrator. We need to check the plugins and the theme editor panel.

    Best regards,
    Ismael

    #495708

    Hi,

    You already are administrator.

    Seems the plugin AAM block you.

    #495948

    Hi!

    I saw the error, not sure what’s causing it. I tried editing your comment in the functions.php file for testing but I didn’t see the other comments you had further down and it caused an error. Can you fix that real quick for us?

    Best regards,
    Elliott

    #495954

    Hi ! Not sure what you expect of me.

    So i delete the comment which cause an error.

    I have a save of this file and this is an offline website. You can edit the function.php the way you want.

    • This reply was modified 4 years ago by  leplusweb.
    #496417

    Hey!

    Can you switch the login back to administrator?

    Cheers!
    Elliott

    #496449

    Hey,

    you already have my administror code above.

    (The second one)

    Cheers

    • This reply was modified 4 years ago by  leplusweb.
    #497177

    Hi!

    I switched it to this.

    add_action( 'admin_print_styles', 'enfold_customization_admin', 10 );
    function enfold_customization_admin() {
    	echo '<style type = "text/css">';
    	echo 'a[href="#avia_sc_button_full"] { display: none; }';
    	echo '</style>';	
    }

    Does it work fine now?

    Regards,
    Elliott

    #497186

    Hi, yeah that’s work fine ! The hook wasn’t the good one …

    Thx a lot !

    Regards

    #497513

    Hey!

    Great! Glad Elliott fixed it. :)

    Regards,
    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Hide Button in the Backend disturd image upload’ is closed to new replies.