• 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

Enqueue scripts Google fonts

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 › Enqueue scripts Google fonts

This topic is: not resolved

Tagged: enqueue, google fonts

  • This topic has 1 reply, 2 voices, and was last updated 11 years, 7 months ago by Victor Font.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 26, 2015 at 2:06 am #142335
    newedgemarketing
    Member

    I want to use Open Sans Condensed for my blog titles, menu's, button links and Open Sans for main body copy. Can anyone tell me if my Enqueue scripts and styles code is correct? I know I have to use css for the rest.

    //* Enqueue scripts and styles
    add_action( 'wp_enqueue_scripts', 'eleven40_enqueue_scripts_styles' );
    function eleven40_enqueue_scripts_styles() {

    wp_enqueue_script( 'eleven40-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );

    wp_enqueue_style( 'dashicons' );
    wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lora:400,700|Oswald:400', array(), PARENT_THEME_VERSION );

    }

    //* 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 );
    }

    http://www.newedgemarketing.com.au/
    February 26, 2015 at 11:15 am #142393
    Victor Font
    Moderator

    No. This is not right. You are missing quotes in the add_action. It should be this:

    add_action( 'wp_enqueue_scripts', 'nem_load_google_fonts ');


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

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