Posted By

chrisaiv on 09/13/14


Tagged

wordpress


Versions (?)

Wordpress: Add A Google Font into the Header


 / Published in: PHP
 

URL: https://wordpress.org/plugins/google-typography/

You might also consider just installing this Wordpress plug-in. It's way easier https://wordpress.org/plugins/google-typography/

  1. /** ******** ******** ******** ******** ******** ******** ******** ********
  2. * TITLE: Add Google Font
  3. * DESCRIPTION: Add a Google Font into the header. You might want to look into installing this plug-in instead [Google Typography](https://wordpress.org/plugins/google-typography/). It's way easier to use.
  4. *
  5. *
  6. */
  7.  
  8. function add_fonts() {
  9. // Styles Format: wp_enqueue_style($handle, $src, $deps, $ver, $media);
  10. wp_register_style('open-sans', 'http://fonts.googleapis.com/css?family=Bree+Serif:400,300,700', array(), false, 'all');
  11. wp_enqueue_style( 'open-sans');
  12. }
  13. add_action('wp_enqueue_scripts', 'add_fonts', 100);

Report this snippet  

You need to login to post a comment.