• anonymized-7517021

    (@anonymized-7517021)


    I wonder how I change the font style of the site title?

    header h2 {
     font-family: Arial, sans-serif;
    }
    header h2 {
     font-family: Arial, sans-serif !important;
    }

    Nothing works, why?

    • This topic was modified 6 years, 4 months ago by anonymized-7517021.
Viewing 5 replies - 1 through 5 (of 5 total)
  • AddWeb Solution

    (@addweb-solution-pvt-ltd)

    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.

    Thread Starter anonymized-7517021

    (@anonymized-7517021)

    Thank you @addweb-solution-pvt-ltd it worked! ??

    Thread Starter anonymized-7517021

    (@anonymized-7517021)

    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.

    Theme Author Anders Norén

    (@anlino)

    Hi @rebecka,

    If you include a link to the page in question, I’ll check the CSS.

    — Anders

    Thread Starter anonymized-7517021

    (@anonymized-7517021)

    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:    https://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:  https://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!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change font style of site title’ is closed to new replies.