Don’t know if I should create a new topic for this, but I want to use a Google Font. I have created a child theme.
I added the following to functions.php
function custom_add_google_fonts() {
wp_enqueue_style( 'custom-google-fonts', 'https://fonts.google.com/specimen/Arizonia?selection.family=Arizonia', false );
}
add_action( 'wp_enqueue_scripts', 'custom_add_google_fonts' );
Full functions.php
<?php
function my_theme_enqueue_styles() {
$parent_style = 'parent-style'; // This is 'davis-style' for the Davis theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function custom_add_google_fonts() {
wp_enqueue_style( 'custom-google-fonts', 'https://fonts.google.com/specimen/Arizonia?selection.family=Arizonia', false );
}
add_action( 'wp_enqueue_scripts', 'custom_add_google_fonts' );
?>
And in style.css
header h2 a {
font-family: Arizonia !important;
font-size: larger;
}
Nothing happens, looks like default.