Hi,
I’m trying to add a Google Font to Essential Grid. Here’s what I’ve done so far.
Website: https://staging6.upstatefilms.org/x-home
Google font: https://fonts.google.com/selection?query=oswald&selection.family=Oswald:300,400,500,600\
I’ve added this to the customizer’s CSS:
@import url(‘https://fonts.googleapis.com/css?family=Oswald+sans-serif:300,400,600&display=swap’);
I’ve added this to the functions.php in the child theme:
add_action (‘wp_head’, ‘custom_google_font’, 9999 );
function custom_google_font() {
echo ‘’;
}
I’ve added the Oswald font to the Punch Fonts as described here:
https://www.themepunch.com/essgrid-doc/google-fonts/
I can select Oswald in Essential Grid, and it shows up as Oswald sans-serif when I inspect the page, but the font is not Oswald. For example, the titles “Dark Waters” and “Marriage Story” in the Essential Grid box on the top left under the slider is styled as Oswald, but it’s defaulting to something else.
Can you help me figure out what I’m missing?
BTW, I’ve made other changes to the functions.php, so just in case the problem is there, here’s the whole file:
<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to X in this file. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Enqueue Parent Stylesheet // 02. Additional Functions // ============================================================================= // Enqueue Parent Stylesheet // ============================================================================= add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); // Additional Functions: Shows buttons for Other Films Playing in Rhinebeck and Switch to Woodstock // ============================================================================= add_filter( 'the_content', 'filter_the_content_in_the_main_loop', 999999999 ); function filter_the_content_in_the_main_loop( $content ) { // Check if we're inside the main loop in a single post page. if ( is_singular('post') && in_the_loop() && is_main_query() ) { if ( in_category( "now-showing" ) ) { return $content . ''; } if ( in_category( "now-showing-woodstock" ) ) { return $content . ''; } } return $content; } // Content Views - remove functions which get content from Cornerstone remove_filter( 'the_content', 'cv_comp_plugin_cornerstone_single', PHP_INT_MAX ); remove_filter( 'pt_cv_field_content_excerpt', 'cv_comp_plugin_cornerstone_core', 9, 3 ); remove_filter( 'pt_cv_field_content_full', 'cv_comp_plugin_cornerstone_core', 9, 3 ); add_action ('wp_head', 'custom_google_font', 9999 ); function custom_google_font() { echo ''; }