I want to change google fonts - Acme Themes

Best Premium and Free WordPress Themes Forums SuperMag I want to change google fonts

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5481
    klatzer
    Participant

    How to change google fonts in Supermag theme. Can I change it through custom css?

    #5484
    acmethemes
    Keymaster

    Hello klatzer,

    Through the custom CSS only you cannot change google fonts. For changing google fonts you need to first enqueue google fonts, then you need to add CSS to use that google fonts.
    First crate child theme https://codex.wordpress.org/Child_Themes and enqueue google fonts by following code in functions.php. (Please enqueue google fonts of your choice )

    /**
     * Enqueue google fonts
     */
    function supermag_scripts() {
        /*google font*/
        wp_enqueue_style( 'supermag-googleapis', '//fonts.googleapis.com/css?family=Oswald:300,400,700|Roboto:300italic,400,500,700', array(), '1.0.1' );
    }
    add_action( 'wp_enqueue_scripts', 'supermag_scripts' );

    now in style.css add following code:

    body {
       font-family: 'Roboto', sans-serif;
    } 

    Please replace example google font with google font of your choice.
    We hope this will solve your problem.

    If you are interested in premium theme, it has one click option to change google fonts and there are 100+ google fonts

    Best Regards,
    AcmeThemes

    #5483
    klatzer
    Participant

    Thank you acmethemes for your effort and example but I don’t think I can do it.
    Anyway thank you for your great theme.

    #5482
    acmethemes
    Keymaster

    Thank you for your feedback. If you want to know anything more please let us know.
    Best Regards,
    AcmeThemes

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘I want to change google fonts’ is closed to new replies.