Articles


How to add font awesome inside Drupal 7?

How to add font awesome inside Drupal 7?



Posted bysivaprasad,28th Jul 2016

Download the font awesome and then move the folder to your theme folder.

Here are the two methods of adding font awesome inside our drupal site.

Method 1:

Then add 'stylesheets[all][] = font-awesome/css/font-awesome.min.css' to the stylesheets included in the .info file.

Method 2:

Write the below function in your template.php file.


function Your-theme_preprocess_html(&$vars) {
  $filepath = path_to_theme() . '/font-awesome/css/font-awesome.min.css';
  drupal_add_css($filepath, array(
  'group' => CSS_THEME,
  ));
}

Then You can use font awesome inside your site wherever you want.

Related Articles