font-awesome not displaying correctly in wordpress bones theme

Trying to get font awesome to work properly in wordpress, i am currently using the bones theme with the visual composer plugin.
if i make a wysiwyg html box and copy some info in there with the class for font awesome it shows the icon however when published to the site it shows nothing. link below is the backend with icon appearing in preview but not text.
backend page content
Frontend not displaying it either
front end not displaying

I have enqueued it like this:

Read More
  // Font Awesome Icons
  function font_awesome() {
  // CDN Network For Font Awesome Icons
  wp_register_style('font_awesome','http://netdna.bootstrapcdn.com/fontawesome/4.0.3/css/font-awesome.css');
  wp_enqueue_style('font_awesome');

  add_action('wp_print_styles', 'font_awesome');
}

have i missed something or is this a bug? any ideas? thanks.

Related posts

1 comment

  1. I just saw that your add_action call is inside your font_awesome function. So your function will never be called, and the font awesome script will never be enqueued.

    Moreover, you shouldn’t use wp_print_styles as it is deprecated since WP 3.3 and can provoke an incompatibility that make the scripts enqueue in admin. Use wp_enqueue_scripts instead:

    function font_awesome() {
      wp_register_style('font_awesome','http://netdna.bootstrapcdn.com/fontawesome/4.0.3/css/font-awesome.css');
      wp_enqueue_style('font_awesome');
    }
    add_action('wp_enqueue_scripts', 'font_awesome');
    

Comments are closed.