function load_fonts() { wp_enqueue_style(‘googleFonts’, ‘http://fonts.googleapis.com/css?family=Montserrat:400,700’); } add_action(‘wp_enqueue_scripts’, ‘load_fonts’); The proper way to load an external font library, such as from Google Fonts, is to use the wp_enqueue_scripts hook. You can use the above sample code in your functions.php code or load it up via a custom plugin. Breaking it down Couple of key points: “wp_enqueue_script” […]
Categories