Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #972819

    Hi, I installed a plugin called WP User Avatar – https://wordpress.org/plugins/wp-user-avatar/ – and I can’t upload new avatar images when I go to the edit profile page. I contacted the plugin support and they tested things and send me reason for the plugin not working:
    —–
    Hello There,
    Hope you are working fine!!

    I have gone through you stagging website and found the issue is with your currently active theme. I have analyzed your theme and here is the following code which is creating an issue for update user avatar.

    Path:- /public_html/wp-content/themes/enfold/functions.php
    Line No.# :- 420-421
    ——–
    avia_enqueue_script_conditionally( $condition , ‘wp-mediaelement’);
    avia_enqueue_style_conditionally( $condition2 , ‘wp-mediaelement’); //With WP 4.9 we need to load the stylesheet seperately
    ——–
    I have commented this code and user avatar plugin is working because theme developer has disabled WordPress media library.
    Please contact your theme developer.
    Thanks,

    —-
    What can I do about this? Is this something you can help me fix so the plugin will work along with the theme without any conflicts?

    #972913

    Hey DROR,

    You can add this code at the bottom of functions.php instead of modifying it from the parent theme:

    function custom_loadscripts() {
    	avia_enqueue_script_conditionally( true , 'wp-mediaelement' , "/wp-includes/js/mediaelement/wp-mediaelement.js", array('mediaelement'), false, 1);
    	avia_enqueue_style_conditionally(  true , 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement.css", array('mediaelement'));
    }
    
    add_action('wp_enqueue_scripts', 'custom_loadscripts', 20);

    Hope it helps :)

    Best regards,
    Nikko

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