Hello Rebecka ,
Add below css code into your current active child theme’s style.css file or you can add additional css option in theme customizer
header h2 a {
font-family: Arial, sans-serif !important;
font-style: italic;
font-size: larger;
}
Hope this will helps you.
Thanks.
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.
Hi @rebecka,
If you include a link to the page in question, I’ll check the CSS.
— Anders
Hi @anlino
Unfortunately, I don’t have the page online (I don’t even have a web host yet).
The page is located locally on my computer.
My child theme consists only of style.css and functions.php
style.css looks like this:
/*
Theme Name: Davis Child
Theme URI: http://example.com/twenty-fifteen-child/
Description: Davis Child Theme
Author: Minimalisten
Template: davis
Version: 1.13
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, custom-menu, featured-images, post-formats, threaded-comments, translation-ready
Text Domain: davis-child
*/
header h2 a {
font-family: Arizonia !important;
font-size: larger;
}
Thanks!