• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Fatal Error due to adding Google Font code

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Fatal Error due to adding Google Font code

This topic is: not resolved

Tagged: Fatal Error, google fonts

  • This topic has 3 replies, 2 voices, and was last updated 11 years, 8 months ago by neilgee.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 24, 2015 at 9:26 pm #142142
    newedgemarketing
    Member

    I've just added this line to my functions php as per studiopress instructions

    //* Enqueue Open+Sans+Condensed Google font
    add_action( 'wp_enqueue_scripts', 'sp_load_google_fonts' );
    function sp_load_google_fonts() {
    wp_enqueue_style( 'google-font-Open+Sans+Condensed', '//fonts.googleapis.com/css?family=Open+Sans+Condensed:700', array(), CHILD_THEME_VERSION );

    }

    And my website crashed. I previously had another line of code for another google font so ended up with had these two lines exactly like this in my php file as i wanted to use these two google fonts:

    //* Enqueue Open+Sans Google font
    add_action( 'wp_enqueue_scripts', 'sp_load_google_fonts' );
    function sp_load_google_fonts() {
    wp_enqueue_style( 'google-font-Open+Sans', '//fonts.googleapis.com/css?family= Open+Sans:300italic,400italic,400,300', array(), CHILD_THEME_VERSION );

    }

    //* Enqueue Open+Sans+Condensed Google font
    add_action( 'wp_enqueue_scripts', 'sp_load_google_fonts' );
    function sp_load_google_fonts() {
    wp_enqueue_style( 'google-font-Open+Sans+Condensed', '//fonts.googleapis.com/css?family=Open+Sans+Condensed:700', array(), CHILD_THEME_VERSION );

    }

    http://www.newedgemarketing.com.au/
    February 24, 2015 at 9:57 pm #142147
    neilgee
    Member

    Could have been multiple functions with the same name try....

    //* Enqueue Google fonts
    add_action( 'wp_enqueue_scripts', nem_load_google_fonts );
    function nem_load_google_fonts() {
    wp_enqueue_style( 'nem-googlefonts', '//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,400,300|Open+Sans+Condensed:700', array(), CHILD_THEME_VERSION );	
    }

    That will load all the google fonts in one call - if you wanted more you can separate them with the '|' pipe symbol


    Neil Gee
    WP Beaches
    Coolest Guides

    February 24, 2015 at 10:23 pm #142151
    newedgemarketing
    Member

    Thanks Neil

    I've added that line and no crash this time!

    I want to use open sans condensed in replacement of oswald for my menu font, headings etc so i've edited all instances of oswald in my css updated the file but its still showing as oswald not open sans condensed.

    I've turned of cache in my cpanel and cleared it in my browser

    February 24, 2015 at 11:07 pm #142152
    neilgee
    Member

    I can still see Oswald in use on the CSS - check line 1032...

    .nav-primary .genesis-nav-menu a {
    	font-family: 'Oswald', sans-serif;
    	font-size: 14px;
    }

    Neil Gee
    WP Beaches
    Coolest Guides

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble