• Hi,

    We are using some FontAwsome icons in Topbar and Footer widgets.

    The icons are showing on the homepage, but not on the other pages.
    The reason they are only showing on the homepage is because we are using YITH WooCommerce Product Slider Carousel as well on that page.

    YITH WooCommerce Product Slider Carousel adds the FontAwsome library.

    What is the proper way to add the FontAwsome library on every page?

    <link rel=’stylesheet’ id=’fontawesome-css’ href=’/wp-content/plugins/yith-woocommerce-product-slider-carousel-premium/assets/css/font-awesome.min.css?ver=5.6.1′ type=’text/css’ media=’all’ />

    Cheers,
    Joel

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Theme Author YITHEMES

    (@yithemes)

    hi there!
    you can add this few lines of php code to your child theme functions.php file

    if ( defined( 'YWCPS_ASSETS_URL' ) ) {
    	add_action( 'wp_enqueue_scripts', 'yith_proteo_customization_load_fontawesome_everywhere' );
    	/**
    	 * Load YITH Product Slider carousel Fontawesome css on all pages
    	 *
    	 */
    	function yith_proteo_customization_load_fontawesome_everywhere(){
    		wp_enqueue_style( 'fontawesome', YWCPS_ASSETS_URL . 'css/font-awesome.min.css' );
    	}
    }

    The code will check if the Product slider Carousel plugin in installed and enabled and will load the fontawesome css from its files. It will be loaded on every page.

Viewing 1 replies (of 1 total)
  • The topic ‘Load FontAwsome library on every page’ is closed to new replies.