New Landing How can we help? Themeforest Theme Support Dante UPDATE: Font Awesome Icons

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Dante
  • #111961
    vitigirl
    Member
    Post count: 22

    Ahoy,

    I’m wondering how I can update available Font Awesome Icons?

    There are several I’d like to be using from version 4.2 but when I use the assigned shortcode, nothing appears on my page. Please-please, instructions on how to update would be fantastic.

    Thanks for the great theme! ๐Ÿ™‚

    #112033
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please use this php code ta functions.php of child theme.

    function sf_enqueue_styles_new(){
    wp_deregister_style('fontawesome');
    wp_dequeue_style( 'fontawesome' )
    wp_register_style('fontawesomeNew', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', array(), NULL, 'all');
    wp_enqueue_style('fontawesomeNew'); 
    }
    add_action('wp_enqueue_scripts', 'sf_enqueue_styles_new', 111); 

    Thanks

    #113105
    vitigirl
    Member
    Post count: 22

    Thanks Mohammed.

    I’m afraid I’m quite the newbie…

    Am I adding this code to the end of the functions.php, down the bottom? Or ammending existing mention of fontawesome?

    Help!

    Thanks ๐Ÿ™‚

    #113116
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please add code at bottom of functions.php.
    Thanks
    Mohammad

    #114310
    vitigirl
    Member
    Post count: 22

    Hi Mohammed,

    Big thanks…but again…rookie status kicks into play.

    Attempted 2 variations, details below. Can you please advise further?

    Big thanks, much appreciate your bearing with me!

    1. ADDED CODE TO BOTTOM OF FUNCTION.PHP, UNDERNEATH FINAL BIT OF CODE. CREATED ERROR (ATTACHED) AND ICONS DIDN’T APPEAR (ATTACHED). EXAMPLE:

    }
    if (class_exists(‘Envato_WP_Toolkit’)) {
    add_action( ‘admin_init’, ‘sf_envato_toolkit_admin_init’ );
    }
    ?>
    function sf_enqueue_styles_new(){
    wp_deregister_style(‘fontawesome’);
    wp_dequeue_style( ‘fontawesome’ )
    wp_register_style(‘fontawesomeNew’, ‘//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css’, array(), NULL, ‘all’);
    wp_enqueue_style(‘fontawesomeNew’);
    }
    add_action(‘wp_enqueue_scripts’, ‘sf_enqueue_styles_new’, 111);

    2. ADDED CODE TO BOTTOM OF FUNCTIONS.PHP, BEFORE FINAL BIT OF CODE. IT CRASHED THE SITE (NO DOUBT YOU’RE NOT SURPRISED!), HAD TO DELETE VIA FTP. EXAMPLE:

    }
    if (class_exists(‘Envato_WP_Toolkit’)) {
    add_action( ‘admin_init’, ‘sf_envato_toolkit_admin_init’ );
    }
    function sf_enqueue_styles_new(){
    wp_deregister_style(‘fontawesome’);
    wp_dequeue_style( ‘fontawesome’ )
    wp_register_style(‘fontawesomeNew’, ‘//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css’, array(), NULL, ‘all’);
    wp_enqueue_style(‘fontawesomeNew’);
    }
    add_action(‘wp_enqueue_scripts’, ‘sf_enqueue_styles_new’, 111);
    ?>

    Attachments:
    You must be logged in to view attached files.
    #114315
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please wrap your code with php tag like this:-

    <?php
    //Your code
    
    ?>

    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register