• 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

Remove 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 › StudioPress Themes › Genesis Sample › Remove Google Fonts

This topic is: resolved

Tagged: google fonts

  • This topic has 4 replies, 1 voice, and was last updated 1 year, 1 month ago by pixelloop.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • March 28, 2021 at 7:58 am #503600
    wb
    Participant

    What is the best way to remove Google Fonts from the Genesis Sample Theme?

    March 28, 2021 at 8:07 am #503601
    Victor Font
    Moderator

    Comment out this block of code in functions.php at line 74:

    wp_enqueue_style(
    		genesis_get_theme_handle() . '-fonts',
    		$appearance['fonts-url'],
    		[],
    		genesis_get_theme_version()
    	);

    Regards,

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

    March 28, 2021 at 11:11 am #503604
    wb
    Participant

    Hi Victor many thanks for this, my code from 3.4.1 (sorry should have mentioned this earlier), the latest version, is slightly different, below shows line 70...92:

    function genesis_sample_enqueue_scripts_styles() {
    
    	$appearance = genesis_get_config( 'appearance' );
    
    	wp_enqueue_style( // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion -- see https://core.trac.wordpress.org/ticket/49742
    		genesis_get_theme_handle() . '-fonts',
    		$appearance['fonts-url'],
    		[],
    		null
    	);
    
    	wp_enqueue_style( 'dashicons' );
    
    	if ( genesis_is_amp() ) {
    		wp_enqueue_style(
    			genesis_get_theme_handle() . '-amp',
    			get_stylesheet_directory_uri() . '/lib/amp/amp.css',
    			[ genesis_get_theme_handle() ],
    			genesis_get_theme_version()
    		);
    	}
    
    }

    I'm not using amp on the site in question, so could I comment out from line 74...90 and nothing will break, or just line 74...79 only as you are suggesting? I'm presuming commenting out the whole of genesis_sample_enqueue_scripts_styles() is going to cause an error.

    March 28, 2021 at 2:26 pm #503606
    wb
    Participant

    I commented out line 74...79 and it worked a treat, all of the google font links in the header have gone, thanks again Victor.

    March 27, 2024 at 2:33 am #507868
    pixelloop
    Participant

    The better way I think, if you want to update the Sample Child Theme in the future, is to use this in a custom PHP file or in a plugin like Snippets.

    add_action( 'wp_print_styles', 'cw_dequeue_google_fonts_style' );
    function cw_dequeue_google_fonts_style() {
          wp_dequeue_style( 'genesis-sample-fonts' );
    }

    I write articles about blogging, WordPress and building a business online at Mazepress.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

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