Support » Plugin: Custom Icons for Elementor » Disable Elementor default icons

  • Resolved Donald Jenkins

    (@donaldjenkins)


    Is it possible to disable the default icons available in Elementor out of the box, so they don’t show up in the icon list, and only the custom icons are displayed?

    I’ve disabled the icons and font-awesome icons css from loading, but a solution to disable them out of the box would be better.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Actually I found out. Add this to the child theme functions.php:

    //* Disable FontAwesome
    add_action( ‘wp_enqueue_scripts’, function() { wp_dequeue_style( ‘font-awesome’ ); }, 50 );

    //* To remove the Font Awesome http request as well
    add_action( ‘elementor/frontend/after_enqueue_styles’, function () { wp_dequeue_style( ‘font-awesome’ ); } );

    //* Disable eicons
    //* add_action( ‘elementor/frontend/after_enqueue_styles’, function() { wp_dequeue_style( ‘elementor-icons’ ); } );

    Plugin Author Michael Bourne

    (@michaelbourne)

    Hey @donaldjenkins

    I also added a filter to the plugin to remove icons from the drop downs to go along with your dequeue of the actual FA files.

    add_filter(‘eci_drop_fa’, ‘__return_true’);

    salubritas

    (@salubritas)

    //* Disable FontAwesome
    add_action( ‘wp_enqueue_scripts’, function() { wp_dequeue_style( ‘font-awesome’ ); }, 50 );

    //* To remove the Font Awesome http request as well
    add_action( ‘elementor/frontend/after_enqueue_styles’, function () { wp_dequeue_style( ‘font-awesome’ ); } );

    //* Disable eicons
    //* add_action( ‘elementor/frontend/after_enqueue_styles’, function() { wp_dequeue_style( ‘elementor-icons’ ); } );

    This isn’t working for me, have the style handle(s) changed? I tried switching it from ‘font-awesome’ to ‘elementor-icons-shared-0’ but that didn’t work. Are the Font Awesome styles enqueued anywhere else that needs adding?

    After messing around a lot with this (since the old tricks seems not to work in recent versions of Elementor) – I disabled default icon sets like eicons and Font awesome by editing /wp-content/plugins/elementor/includes/frontend.php

    just disable these lines:

    		wp_register_style(
    			'font-awesome',
    			$this->get_css_assets_url( 'font-awesome', 'assets/lib/font-awesome/css/' ),
    			[],
    			'4.7.0'
    		);
    
    		wp_register_style(
    			'elementor-icons',
    			$this->get_css_assets_url( 'elementor-icons', 'assets/lib/eicons/css/' ),
    			[],
    			'5.3.0'
    		);

    A while ago the Elementor page with code to dequeue the icon styles was updated, and the new code worked for me:

    https://docs.elementor.com/article/286-speed-up-a-slow-site

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