• Ok the default font I’m using with this theme is Helvetica. I tried to use Google Font on the blockquote element. I imported the font I want in the functions.php and in the css I applied the font to the blockquote. It appears correctly on the homescreen widgets but somehow the same blockquote style doesn’t appear on the other posts and pages and it only shows helvetica. Also some of the texts under p tag or ul li tags also appear to be Time. Any suggestions to fix the problem? Oh and by the way, great theme!
    Sorry I can’t share the website details cuz it’s private server.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Silkalns

    (@silkalns)

    Sharing some code that you used would be helpful.

    The basic idea to change fonts to Open Sans from Google Fonts you can use code like this via functions.php

    // Add Google Fonts
      wp_register_style( 'dazzling-fonts', '//fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,700');
    
      wp_enqueue_style( 'dazzling-fonts' );

    From there you will be able to apply it to any element using CSS

    font-family: 'Open Sans', sans-serif;

    Thread Starter Mon

    (@pmtheint)

    Okay this is what I did on functions.php

    wp_register_style( 'fjalla', 'http://fonts.googleapis.com/css?family=Fjalla+One:400,700', false, '1.0', 'all' );
    	wp_enqueue_style( 'fjalla');

    And on the CSS I have this

    blockquote {
    font-family: 'Fjalla One', sans-serif;
        font-size: 14px;

    Theme Author Silkalns

    (@silkalns)

    This code is completely unnecessary at the end.
    , false, '1.0', 'all'

    Also make sure to avoid specifying what protocol do you use. So you can remove this part as well:

    http:

    Thread Starter Mon

    (@pmtheint)

    Hi, sorry. I tried that but it still doesn’t work. Thing is, it’s appearing in widgets but just not withing posts and pages body. So I assume the body overwrites the font? Is there anything I could remove in order to not allow overwrites?

    Thread Starter Mon

    (@pmtheint)

    Oh wait, I tested it with firefox and it was working fine. Guess it’s Chrome problem :/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using Google Font’ is closed to new replies.