• 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

uploaded code for google fonts and got an error message

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 › General Discussion › uploaded code for google fonts and got an error message

This topic is: not resolved
  • This topic has 4 replies, 4 voices, and was last updated 11 years, 9 months ago by chillybin.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • December 8, 2013 at 12:14 pm #77714
    frobin
    Participant

    followed the instructions to upload google fonts. When I save and refreshed my page I got this error message,

    error message: Parse error: syntax error, unexpected $end in /home/fromlond/public_html/6robinsphotographytrailblazers.com/wp-content/themes/executive-pro/functions.php on line 206

    How can I undo the code in order to restore my site.

    I followed these instructions:

    We now use and recommend this new method. Open up the functions.php file of one of our child themes and place the following code:

    1
    2
    3
    4
    5
    6
    7
    8
    <?php
    //* Do NOT include the opening php tag

    //* Enqueue Lato Google font
    add_action( 'wp_enqueue_scripts', 'sp_load_google_fonts' );
    function sp_load_google_fonts() {
    wp_enqueue_style( 'google-font-lato', '//fonts.googleapis.com/css?family=Lato:300,700', array(), CHILD_THEME_VERSION );
    }

    view raw functions.php hosted with ❤ by GitHub

    The code you see above will load a Google Font style sheet and will also include the Lato Font in weights of 300 and 700. And that’s all there is to it.

    http://www.6robinsphotographytrailblazers.com
    December 8, 2013 at 12:17 pm #77716
    nutsandbolts
    Member

    To remove the code from functions.php, you'll need to access your files either via FTP or your host's file manager and edit the file that way.

    This is the only part that should have been pasted into your functions file:

    //* Enqueue Lato Google font
    add_action( ‘wp_enqueue_scripts’, ‘sp_load_google_fonts’ );
    function sp_load_google_fonts() {
    wp_enqueue_style( ‘google-font-lato’, ‘//fonts.googleapis.com/css?family=Lato:300,700′, array(), CHILD_THEME_VERSION );
    }

    If any of the rest got pasted in, that will explain the parse error.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    February 7, 2014 at 3:51 pm #89215
    creativegifts
    Participant

    Okay, I did the same thing. I can download my functions.php file via my cpanel. How in the world do I open it in order to delete the code that I added based on your instructions?

    February 7, 2014 at 3:54 pm #89216
    nutsandbolts
    Member

    You should be able to open it in a basic text editor - don't use MS Word or anything because it will add formatting to it.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    February 7, 2014 at 6:15 pm #89257
    chillybin
    Member

    You can edit in cPanel, or download something like Notepad++ on Windows


    We are a web design & development consultancy based in Singapore who specialise in all things WordPress & Genesis. | ChillyBin Web Design & Consultancy: http://www.chillybin.com.sg | Twitter: @chillybindesign

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ 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

© 2025 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