• 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

Cant get font body to be different to Title body in Metro

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 › Cant get font body to be different to Title body in Metro

This topic is: resolved

Tagged: google fonts metro

  • This topic has 12 replies, 2 voices, and was last updated 12 years, 2 months ago by Sridhar Katakam.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • August 29, 2013 at 2:37 pm #59595
    psikon
    Member

    Hi,

    I am using Google fonts.

    I want all headings to be Oswald and all body text to be Lora. I'm pretty sure the below is what I need to change but where?
    Any help would be much appreciated.

    /* 02b - Font Family ----------- */

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    body,
    input,
    textarea,
    .entry-title a {
    font-family: Oswald, Georgia, Serif;
    }

    .widgettitle,
    #comments h3,
    #respond h3,
    #title {
    font-family: Lora, Georgia, Serif;
    }

    August 29, 2013 at 11:34 pm #59650
    Sridhar Katakam
    Participant

    1) In style.css, navigate to:

    
    /*
    05 Headings
    ---------------------------------------------------------------------------------------------------- */

    There you will find

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .entry-title a {
    	line-height: 1.2;
    	margin-bottom: 16px;
    	margin-bottom: 1rem;
    }

    Change it to

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .entry-title a {
    	line-height: 1.2;
    	margin-bottom: 16px;
    	margin-bottom: 1rem;
    	font-family: 'Oswald', sans-serif;
    }

    2) In functions.php, change

    // Load Oswald Google font
    add_action( 'wp_enqueue_scripts', 'metro_load_google_font' );
    function metro_load_google_font() {
    	wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Oswald:400', array(), PARENT_THEME_VERSION );
    }

    to

    // Load Oswald and Lora Google fonts
    add_action( 'wp_enqueue_scripts', 'metro_load_google_font' );
    function metro_load_google_font() {
    	wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Oswald:400', array(), PARENT_THEME_VERSION );
    	wp_enqueue_style( 'google-font-2', 'http://fonts.googleapis.com/css?family=Lora', array(), PARENT_THEME_VERSION );
    }

    and then in style.css, change

    /* 02b - Font Family ----------- */
    
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    body,
    input,
    textarea,
    .entry-title a {
    	font-family: Helvetica, Arial, sans-serif;
    }

    to

    /* 02b - Font Family ----------- */
    
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    body,
    input,
    textarea,
    .entry-title a {
    	font-family: 'Lora', serif;
    }

    Genesis Tutorials | Follow me on Twitter

    August 30, 2013 at 7:05 am #59680
    psikon
    Member

    Hi Sridhar,

    Thanks for your help but when i copy paste that code into functions.php I get a syntax error? Could there be a character missing possibly?

    August 30, 2013 at 8:04 am #59689
    Sridhar Katakam
    Participant

    Can you paste the error msg?

    Also paste the code present in child theme's functions.php at http://www.pastebin.com and give us a link.


    Genesis Tutorials | Follow me on Twitter

    August 30, 2013 at 12:02 pm #59717
    psikon
    Member

    Thanks again for your help with this:

    This is the error:

    ( ! ) Parse error: syntax error, unexpected 'google' (T_STRING) in functions.php on line 21
    Call Stack
    # Time Memory Function Location
    1 0.0007 340264 {main}( ) ..\theme-editor.php:0
    2 0.0011 408016 require_once( 'D:\wamp\www\admin.php' ) ..\theme-editor.php:10
    3 0.0013 426128 require_once( 'D:\wamp\www\wp-load.php' ) ..\admin.php:30
    4 0.0015 437736 require_once( 'D:\wamp\www\wp-config.php' ) ..\wp-load.php:29
    5 0.0020 529480 require_once( 'D:\wamp\www\wp-settings.php' ) ..\wp-config.php:90

    And here is the link for child themes function http://pastebin.com/33ukEBZk

    August 30, 2013 at 12:45 pm #59727
    Sridhar Katakam
    Participant

    Lines 17 through 21 is unmodified code, isn't it?

    What/where exactly did you make my earlier suggested change inside metro's functions.php?


    Genesis Tutorials | Follow me on Twitter

    August 30, 2013 at 12:57 pm #59736
    psikon
    Member

    sorry sridhar I changed the code back to normal after the error, but I made the change here:

    }

    // Load Oswald Google font
    add_action( 'wp_enqueue_scripts', 'metro_load_google_font' );
    function metro_load_google_font() {
    wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Oswald:400', array(), PARENT_THEME_VERSION );
    }

    The above I changed for this:

    // Load Oswald and Lora Google fonts
    add_action( 'wp_enqueue_scripts', 'metro_load_google_font' );
    function metro_load_google_font() {
    wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Oswald:400', array(), PARENT_THEME_VERSION );
    wp_enqueue_style( 'google-font-2', 'http://fonts.googleapis.com/css?family=Lora', array(), PARENT_THEME_VERSION );
    }

    August 30, 2013 at 1:02 pm #59738
    Sridhar Katakam
    Participant

    Can you paste the error causing full code in functions.php at http://www.pastebin.com and give us a link?


    Genesis Tutorials | Follow me on Twitter

    August 30, 2013 at 1:06 pm #59739
    psikon
    Member

    sure one second....

    August 30, 2013 at 1:08 pm #59740
    psikon
    Member

    here you are Sridhar:

    http://pastebin.com/hMdaT8Nn

    August 30, 2013 at 1:17 pm #59742
    Sridhar Katakam
    Participant

    Change http://pastebin.com/NXebASan to http://pastebin.com/vYnB1RGi


    Genesis Tutorials | Follow me on Twitter

    August 30, 2013 at 1:23 pm #59743
    psikon
    Member

    Excellent!

    Thanks very much Sridhar I really appreciate your help. Do you offer custom them coding services? If so what are your rates?

    August 30, 2013 at 1:29 pm #59746
    Sridhar Katakam
    Participant

    Yes.

    I can be reached via http://sridharkatakam.com/contact/


    Genesis Tutorials | Follow me on Twitter

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 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

© 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