Font change: Functions.php or header script?

Community Forums Forums Design Tips and Tricks Font change: Functions.php or header script?

This topic is: not resolved

This topic contains 4 replies, has 4 voices, and was last updated by  creativeroute 1 year, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #92049

    Ron Jones

    I want to use a particular pair of Google Fonts in one of the Studio Press themes. A few days ago, I saw here a snippet of code for changing the default font by using functions .php.

    Would there be any advantage to using functions.php to make that change…

    …. or would it be better to use the Theme Settings > Header scripts box?




    If you theme already includes this code in your child themes functions file, simply modify it with the names for your new font or add to it with the new font which would be safer but less efficient of not using the old fonts.

    //* Enqueue Google fonts
    add_action( ‘wp_enqueue_scripts’, ‘executive_google_fonts’ );
    function executive_google_fonts() {
    	wp_enqueue_style( ‘google-font’, ‘//,700italic,400,700′, array(), CHILD_THEME_VERSION );


    Ron Jones

    Thanks Brad! I’ve got my google fonts all queued up.

    But… what happens when the child theme (in this particular case, it’s Executive Pro) is updated…won’t I lose my settings?



    I think you will lose your settings. I have watched a video on You Tube about this topic. She suggests creating a custom css style sheet for this very reason.



    Thanks for posting the video Alison. She is very thorough.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.