Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1280619
    StefanHabel
    Participant

    I am trying to add a google font for a blockquote.

    I added

    function wpb_add_google_fonts() {
    wp_enqueue_style( ‘wpb-google-fonts’, ‘http://fonts.googleapis.com/css?family=Satisfy’, false );
    }
    add_action( ‘wp_enqueue_scripts’, ‘wpb_add_google_fonts’ );

    to the child theme function.php

    and use the following custom.css

    .x-cite {
    font-family: ‘Satisfy’, cursive;
    font-size: 28px;
    color: blue;
    }

    The color is just for testing purpose :D.

    I can switch to times font e.g., which means the google font is not loaded but i dont know why.

    #1280638
    Rupok
    Member

    Hi there,

    Thanks for writing in! You can simply import the font with @import statement within your Child Theme’s style.css.

    You can also try adding like this :

    add_action ('wp_head', 'wpb-google-fonts', 9999 );
    function wpb-google-fonts() {
      echo '<link href="http://fonts.googleapis.com/css?family=Satisfy" rel="stylesheet" type="text/css">'; 
    }

    Hope this helps.

    Cheers!

    #1282251
    StefanHabel
    Participant

    Ok, the @import worked :).

    Thanks!

    #1282612
    Prasant Rai
    Moderator

    You are most welcome. 🙂

  • <script> jQuery(function($){ $("#no-reply-1280619 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>