• Resolved aduwow

    (@aduwow)


    Are there any instructions on how I can disable the front-end loading of dashicons while still being able to use this plugin? I want to replace dashicons with Font Awesome. Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support fizanzvai

    (@fizanzvai)

    Hi,

    Thanks for reaching out to us. You can add the following snippet using a plugin called Code Snippets

    add_action( 'wp_enqueue_scripts', 'gwp_wvg_remove_dashicons_frontend', 100 );
    function gwp_wvg_remove_dashicons_frontend(){ 
       wp_deregister_style( 'dashicons' ); 
    }

    It will disable dashicons from the frontend. Then you can simply add the follwing snippet to add your own fontawesome icon:

    add_filter( 'woo_variation_gallery_slider_js_options', 'gwp_wvg_gal_fa_icon', 50, 1 );
    function gwp_wvg_gal_fa_icon( $slider_js_options ){
    	$slider_js_options['prevArrow'] = '<i class="wvg-slider-prev-arrow fa fa-my-icon"></i>';
    	$slider_js_options['nextArrow'] = '<i class="wvg-slider-prev-arrow fa fa-my-icon"></i>';
    	return $slider_js_options;
    }
    
    add_filter( 'woo_variation_gallery_thumbnail_slider_js_options', 'gwp_wvg_thumb_fa_icon', 50, 1 );
    function gwp_wvg_thumb_fa_icon( $thumbnail_js_options ){
    	$thumbnail_js_options['prevArrow'] = '<i class="wvg-slider-prev-arrow fa fa-my-icon"></i>';
    	$thumbnail_js_options['nextArrow'] = '<i class="wvg-slider-prev-arrow fa fa-my-icon"></i>';
    	return $slider_js_options;
    }

    You can also add the above snippets using your child theme’s functions.php.

    Note: It is recommended to add the Custom Code to the child theme’s functions.php file, to avoid any data loss while updating the Parent Theme.

    Hope to hear from you soon.

    Thank You

    Thread Starter aduwow

    (@aduwow)

    Thank you very much for your assistance.

    Your first code snippet will disable dashicons both on the backend and frontend. This isn’t an issue for me because I use a plugin to disable dashicons only from the user interface side.

    The second code snippet helps me replace the next and prev icons with Font Awesome. However, there’s still an issue with the zoom icon, which continues to use dashicons. Could you please provide additional code to help me change this zoom icon as well? It still throws an error if dashicons aren’t loaded. Below are two screenshots: one when I use dashicons and another when I disable them. I’m not a coder, but I suspect that this plugin might require dashicons to be loaded. Hopefully, in an upcoming update, you’ll consider removing this mandatory requirement, as there are likely many others like me who don’t use dashicons but prefer other font icon libraries.

    I look forward to your prompt response.
    Thank you

    https://ibb.co/K575gfx

    https://ibb.co/gwbdDnL

    • This reply was modified 7 months, 1 week ago by aduwow.
    Plugin Support fizanzvai

    (@fizanzvai)

    Hi,

    We have released a version 1.3.22. Please update to the latest release. We have removed the dependency of the dashicons.

    To change the magnify/zoom icon you can add a snippet like this-

    add_filter( 'woo_variation_gallery_zoom_icon_html', 'gwp_wvg_zoom_icon', 50, 2 );
    function gwp_wvg_zoom_icon( $zoom_icon_markup, $product ){
    	return '<span class="fa fa-my-icon"></span>';
    }

    Please let me know if it helps. Hope to hear from you soon.

    Thank You

    Thread Starter aduwow

    (@aduwow)

    Thanks for your additional guidance along with the changes in the latest update. The code snippets all work fine. I appreciate your work, and I will rate the plugin 5 stars. Hopefully, more people will discover and use this great plugin.

    Plugin Support fizanzvai

    (@fizanzvai)

    Hi,

    Thank you so much for your wonderful feedback.

    Feedback like this encourage us to put in more effort to serve you.

    Please feel free to get in touch if you need help with anything. 

    Thank you & Have a great day ahead!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable dashicons icons front-end’ is closed to new replies.