The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Alternative type for the site (6 posts)

  1. samrods
    Posted 2 years ago #

    Hi, everyone.

    I have a question.
    I created a child theme and I defined different types of letter for the menu, bottom of page, etc (the non-serif ones). But the theme downloads two fonts from google: "quicksand" and "playfair display". The one I am NOT using is Quicksand.

    My question is: how do I prevent quicksand font from being downloaded from google? Using only files in the chil theme. I don't want to edit function.php.

    Because it is a waste of time in page load, since i am not using it (and it is not showing properly, either, a problem that was reported by other users).

    For those who have the same trouble with quicksand font, here is the font stack I did, to replace "Quicksand, Helvetica, Arial, sans-serif;" i did this:

    font-family: Optima, Candara, "Nimbus Sans", "Trebuchet MS", sans-serif ;

    Thanks in advance for helping.

  2. Andrew Nevins
    Forum moderator
    Posted 2 years ago #

    Look at the "spun_google_fonts" function in the functions.php file of Spun: http://themes.svn.wordpress.org/spun/2.0.2/functions.php

    It enqueues the font files, therefore you can dequeue them in your (Child Theme) functions.php file: http://codex.wordpress.org/Function_Reference/wp_dequeue_style

  3. samrods
    Posted 2 years ago #

    Thank you for sucj«h a short answer, Andrew.
    just let me know if i can get it right, since this is the kind of thing i can't really test, I think.

    This is the code for the font quicksand in functions.php:


    And this is the instruction from the site you gave me:

    <?php wp_dequeue_style( $handle ) ?>

    So, I should do like this in my styles.css:
    <?php wp_dequeue_style( $$protocol://fonts.googleapis.com/css?family=Quicksand:300 ) ?>

    Or something else?

  4. Andrew Nevins
    Forum moderator
    Posted 2 years ago #

    The '$handle' is the first parameter in the 'wp_register_style' function: http://codex.wordpress.org/Function_Reference/wp_register_style

    Therefore the handle you should use is 'spun-quicksand':

    wp_dequeue_style( 'spun-quicksand' );
  5. samrods
    Posted 2 years ago #

    Thank you very much, Andrew.
    I have something more to ask you, because of the link to spun 2.0.2 but it will be in another post.


  6. Andrew Nevins
    Forum moderator
    Posted 2 years ago #

    Phew luckily the font stuff was the same in the Spun version 1.0.7 functions.php file as the 2.0.2, so that didn't lead you on a goose chase or break your site.

    But there are other noticeable differences so be aware of this: http://www.diffchecker.com/6dg1cffm (v.1.0.7 on the left | v.2.0.2 on the right).

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic