Title: Adding custom icons
Last modified: August 22, 2016

---

# Adding custom icons

 *  Resolved [r00ster](https://wordpress.org/support/users/r00ster/)
 * (@r00ster)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/)
 * Hey,
 * I tried to add SlideShare icon to your plugin but cant get it working for some
   reason.
 * I added this code to wp-font-awesome-share.php:
 *     ```
       ,
       'code' => array(
       'name' => 'Slide-share',
       'icon' => 'slideshare',
       'link' => 'http://www.slideshare.net/customer_id'
       )
       ```
   
 * And I added this line o style.css:
 *     ```
       a.wpfai-slideshare.wpfai-link { color: #0da8aa; }
       ```
   
 * The SlideShare icon appeares in the font-awesome-share settings and I can activete
   it, but it wont work right on the site. It just shows colored round icon without
   slideshare icon in it. Also the link wont work. There is nothing in the a href
   tag.
 * What should I do now?
 * [https://wordpress.org/plugins/wp-font-awesome-share-icons/](https://wordpress.org/plugins/wp-font-awesome-share-icons/)

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Author [Nitroweb](https://wordpress.org/support/users/spyrosvl/)
 * (@spyrosvl)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459644)
 * Hello r00ster,
 * Please try this instead:
 *     ```
       'slideshare' => array(
       'name' => 'Slide-share',
       'icon' => 'slideshare',
       'link' => 'http://www.slideshare.net/customer_id'
       )
       ```
   
 * and also please use `add_filter`
 * Best regards,
    Spyros
 *  Thread Starter [r00ster](https://wordpress.org/support/users/r00ster/)
 * (@r00ster)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459818)
 * Thanks for the reply.
 * What do you mean by add_filter?
 * I replaced ‘code’ with ‘slideshare’ and now the link is working but there’s still
   no icon inside the circle. Also, how to make the browser window open as ‘normal’
   size instead?
 *  Plugin Author [Nitroweb](https://wordpress.org/support/users/spyrosvl/)
 * (@spyrosvl)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459835)
 * Hello r00ster,
 * You may read about `add_filter` here: [http://codex.wordpress.org/Function_Reference/add_filter](http://codex.wordpress.org/Function_Reference/add_filter)
 * I have two `apply_filters` in the code that will make possible to add your code
   in the icons array.
 * Can you please post a link to your site. I may be able to debug.
    To make the
   icons behave as normal links please use this code in the functions.php of your
   theme:
 *     ```
       function rooster_dequeue_script() {
          wp_dequeue_script( 'wpfai_js' );
       }
       add_action( 'wp_print_scripts', 'rooster_dequeue_script', 100 );
       ```
   
 *  Thread Starter [r00ster](https://wordpress.org/support/users/r00ster/)
 * (@r00ster)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459841)
 * Thanks spyrosvl!
 * Links open correctly now, but I’m still having trouble using `add_filter`. How
   should I use this code?
 * [Here’s a link to my site](http://oivacms.fi/cqsystems/)
 *  Plugin Author [Nitroweb](https://wordpress.org/support/users/spyrosvl/)
 * (@spyrosvl)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459843)
 * Hello r00ster,
 * This should do the trick:
 *     ```
       function my_slideshare_icon($wpfai_socialmedia) {
   
         $wpfai_socialmedia['slideshare'] = array(
           'name' => 'Slide-share',
           'icon' => 'slideshare',
           'link' => 'http://www.slideshare.net/customer_id'
         );
         return $wpfai_socialmedia;
       }
   
       add_filter('wpfai_array_filter', 'my_slideshare_icon', 99, 1);
       ```
   
 * Please try to understand the code if you are a developer. If you are not just
   paste it in your functions.php of your child theme.
 * About the icon not displaying. The plugin custom facebook feed pro is loading
   font awesome already, but the version is older (4.0.3). The slideshare icon was
   not there in this version. My plugin is designed to not load the font awesome
   library if it is already there.
 * You can either hack my plugin and delete/comment out lines 437 & 440, but you
   will need to do this everytime the plugin gets updated or you can remove the 
   outdated font awesome library with something like this in the functios.php file
   of your theme:
 * `wp_dequeue_style('cff-font-awesome');`
 * or you can remove the cff plugin 🙂
 * I hope I was helpful.
 * Best regards,
    Spyros
 *  Thread Starter [r00ster](https://wordpress.org/support/users/r00ster/)
 * (@r00ster)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459855)
 * Hello spyrosvl,
 * You’re right about cff plugin. I tried turning it off and it worked. But the 
   problem isn’t solved yet since I still need to use CFF.
 * I tried reinstalling both plugins and adding
 *     ```
       'slideshare' => array(
       'name' => 'Slide-share',
       'icon' => 'slideshare',
       'link' => 'http://www.slideshare.net/customer_id'
       )
       ```
   
 * to your plugin. Everything else is working fine but the Slideshare icon is still
   not on my homepage, only empty circle is displayed. I can see the icon on the
   plugin settings page though.
 *  Plugin Author [Nitroweb](https://wordpress.org/support/users/spyrosvl/)
 * (@spyrosvl)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459856)
 * Hello r00ster,
 * Indeed, nothing is going to be fixed even by reinstalling the plugins. Yes the
   icon may be available in wp-admin.
    I suggest you follow my instuctions posted
   above to fix this.
 * Best regards,
    Spyros
 *  Plugin Author [Nitroweb](https://wordpress.org/support/users/spyrosvl/)
 * (@spyrosvl)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459857)
 * P.S. or ask cff authors to update the font-awesome library of their plugin and
   release an update.
 *  Thread Starter [r00ster](https://wordpress.org/support/users/r00ster/)
 * (@r00ster)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459858)
 * Thanks spyrosvl
 * I commented lines 437 and 440 and everything is working just fine.
 * Here’s the piece of code for those who have the same problem
 *     ```
       /********** add to selected positions END **********/
   
       // load font awesome or not
        function wpfai_load_scripts () {
   
         //if (wpfai_check_css('font-awesome.css') == 0 && wpfai_check_css('font-awesome.min.css') == 0  && get_option('wpfai_loadfa') == 'yes') {
           wp_register_style( 'wpfai_font-awesome', plugins_url( '/wp-font-awesome-share-icons/fontawesome/css/font-awesome.min.css' ) );
       		wp_enqueue_style( 'wpfai_font-awesome' );
        // }
       ```
   
 * Thanks for help and great plugin spyrosvl!
 *  Plugin Author [Nitroweb](https://wordpress.org/support/users/spyrosvl/)
 * (@spyrosvl)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459871)
 * You are welcome r00ster.
    Thank you for using the plugin. Please remember to 
   comment the lines again after the next plugin update.
 *  [rudegoose](https://wordpress.org/support/users/rudegoose/)
 * (@rudegoose)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459975)
 * Hello, sorry to dig up an old thread, but I have tried to add a custom print 
   icon via functions.php without any success. It works fine if I add it directly
   to wp-font-awesome.php. Here’s the code:
 *     ```
       //add a printer icon to the Font Awesome social sharing plugin
       function my_print_icon($wpfai_socialmedia) {
   
         $wpfai_socialmedia['print'] = array(
             'name' => 'Print',
             'icon' => 'print',
             'link' => 'javascript:window.print()'
         );
         return $wpfai_socialmedia;
       }
   
       add_filter('wpfai_array_filter', 'my_print_icon');
       ```
   
 * Thank you so much, I love what this plugin can do and so want it to work!
 *  [Chip](https://wordpress.org/support/users/chip_88/)
 * (@chip_88)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459985)
 * Hi rudegoose!
 * I also was trying to add a custom print icon and your code did exactly what I
   was searching for.
 * Thanks!
    You made my day! 😉
 * Regards,
    Chipy
 *  [rudegoose](https://wordpress.org/support/users/rudegoose/)
 * (@rudegoose)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459986)
 * Hi Chipy, that’s fantastic thanks so much for letting me know. Just be careful
   to keep a copy of the edited file because it will be overwritten if you upgrade
   the plugin. That’s why I was trying to find a way to add it to the theme functions
   file instead.
 *  [Chip](https://wordpress.org/support/users/chip_88/)
 * (@chip_88)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459987)
 * Thanks for your reply, rudegoose!
 * Unfortunately, as posted already [here](https://wordpress.org/support/topic/some-really-unexpected-behaviour?replies=1),
   I have some really unexpected behaviour of the print icon among different browsers.
 * Maybe you do know why this happens?
 * Thanks again in advance about a timely response!
 * Regards,
    Chipy

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Adding custom icons’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-font-awesome-share-icons_ffffff.
   svg)
 * [WP Font Awesome Share Icons](https://wordpress.org/plugins/wp-font-awesome-share-icons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-font-awesome-share-icons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-font-awesome-share-icons/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-font-awesome-share-icons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-font-awesome-share-icons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-font-awesome-share-icons/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)

 * 14 replies
 * 4 participants
 * Last reply from: [Chip](https://wordpress.org/support/users/chip_88/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/adding-custom-icons/#post-5459987)
 * Status: resolved