Prose Theme – Google font help

Community Forums Forums Design Tips and Tricks Prose Theme – Google font help

This topic is: resolved

This topic contains 11 replies, has 2 voices, and was last updated by  middayminer 9 months, 3 weeks ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #48575

    middayminer
    Participant
    Post count: 72

    Hi, I’m trying to add Google fonts to my blog but I’m not seeing any changes. Added this from Brian Gardner’s page at http://www.briangardner.com/code/load-google-fonts/ into the custom code area

    
    //* Load Lato and Merriweather Google fonts
    add_action( 'wp_enqueue_scripts', 'custom_load_google_fonts' );
    function custom_load_google_fonts() {
    	wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Lato:300,400|Merriweather:300,400', array(), PARENT_THEME_VERSION );
    }

    Is there something I’m missing? How do I change the font families available in Design Settings?

    #48579

    middayminer
    Participant
    Post count: 72

    To clarify, I added these in custom css and custom code areas respectively:

    font-family: 'Oswald', sans-serif;
    font-family: 'Lato', sans-serif;
    add_action( 'wp_enqueue_scripts', 'custom_load_google_fonts' );
    function custom_load_google_fonts() {
    	wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Lato:300,400|Oswald:300,400', array(), PARENT_THEME_VERSION );
    }
    #48658

    middayminer
    Participant
    Post count: 72

    Bump -thoughts on this, anyone? Studiopress support directed me to the forums for this particular query and a topic search gives no topics for setting google fonts up from scratch.

    #48667

    dev
    Participant
    Post count: 408

    See: http://www.studiopress.com/tips/google-web-fonts.htm

    You can use the code method, but CSS works just as well. (I would not use both!) You can put a ‘pipe’ between the different fonts if downloading more than one.

    @import url(http://fonts.googleapis.com/css?family=PT+Sans|Constantia|EB+Garamond);

    The issue may be the custom CSS is not overriding the normal CSS? I don’t know Prose and don’t use custom CSS files.

    Perhaps if you gave us a link to the site we could be of more help.

    [editorial] I don’t understand why people ask for help, but don’t give us a link to their site? Happens all the time. Maybe if we all just stop responding to requests where there is no link, people will ‘get it’. [/editorial]

    #48678

    middayminer
    Participant
    Post count: 72

    Well dev, in this case I didn’t link the website because I thought the method of implementing Google fonts was universal across the genesis framework, as I did not see mention of specific theme implementations here: http://www.briangardner.com/tutorials/load-google-fonts-genesis/

    My decision to leave my website out was not a case of not caring enough to type out this scant piece of information, but out of a desire to keep my posts concise for the people already spending time to help me and discuss only the variables out of my control, i.e. the new code I’m trying to add.

    Thirdly, my website currently reflects poorly on my technical knowledge and I take great relief in hiding it behind an under construction plugin.
    In short, forgive my ignorance, here it is: http://www.foundwonders.com

    I’ve added this in the css custom code section, but it won’t take.
    @import url(http://fonts.googleapis.com/css?family=Oswald);

    #48681

    dev
    Participant
    Post count: 408

    You are using the Prose theme… which seems to be problematic for lots of people. I don’t know why it is so popular.

    Figure out how to turn off “minify” and we can see your CSS files.

    As for your tech knowledge, we all come here to increase said knowledge. No one is judging you (lest they themselves be judged!) No one cares if you are a 30-day newbie, or a 30-year vet in IT (as I am.) No one knows ‘everything’ and everyone is wrong… often! I’m wrong more than most… just ask my wife of 30 years!

    When it comes to web development my motto is “CSS will defeat you every day!”

    No ego here. No need to be defensive. We’re all here to help each other.

    This is a Genesis board, not a Linux board. :-)

    http://www.NewMediaWebsiteDesign.com

    #48686

    middayminer
    Participant
    Post count: 72

    I prefer to see it as being communicative than defensive. I’ve had enough real life misunderstandings by just not getting the other party to see where I was coming from. :)

    Well, I can tell you why I chose Prose. Lots of design settings promised less chance of needing to code something to get the look I want. It also stood out by costing several dollars more. That must be the proof of how well the customisation works, I thought.

    Right, I’ve unchecked minify in design settings and W3 Total Cache for css and html, just in case.

    #48695

    dev
    Participant
    Post count: 408

    Well, I see the regular style.css that does not have an @import and I see the custom css which does.

    No problem. It works just fine… IF you style the parts you want to use Oswald. Just importing it does not make it a default font.

    Try this in custom css:

    body, p {
    font-family: 'Oswald','Century Gothic', sans-serif;
    }
    

    It worked for me. It will change the body of all your posts and pages to Oswald.

    Here is the current CSS:

    body, p {
    color: #40454A;
    font-family:  'Century Gothic', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    }
    

    When I changed it, it got very dark so you might want to change the color. Oswald is a good title font but a crappy ‘reading’ font in my opinion.

    #48701

    middayminer
    Participant
    Post count: 72

    Confirming here that this is now the code I have in custom csss:

    @import url(http://fonts.googleapis.com/css?family=Oswald);
    
    body, p {
    font-family: 'Oswald','Century Gothic', sans-serif;
    }

    However, nothing’s changed. I should mention that tech support said this: “Unfortunately, we are not able to provide assistance with this, as it will require customization to your theme’s code. Your customization question would be a great question for the community forums.”
    My question involved the sidebar background color, google fonts and manually adding layouts.

    Just found this: http://www.wpbeginner.com/wp-themes/how-add-google-web-fonts-wordpress-themes/

    I temporarily removed the custom css and added this in custom code instead:

    add_action( 'genesis_meta', 'wpb_add_google_fonts', 5);
    
    function wpb_add_google_fonts() {
    		echo '<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lora|Oswald" media="screen">';
    }

    Nothing. I even manually edited functions.php in my child theme directory with the same code and saw no change as well!
    I’ve reverted everything back to just the updated css code for now.

    #48705

    dev
    Participant
    Post count: 408

    I just checked your site and your code is working fine. The page paragraphs are in Oswald which is what the CSS code you put in does.

    Maybe you have to re-load the page after clearing your cache?

    Are you using IE? Try Chrome or Firefox, etc.

    It’s working just fine.

    #48707

    middayminer
    Participant
    Post count: 72

    No, I’m using firefox 21, but I found the problem. Ugh, it has something to do with noscript doing something weird even though I’ve whitelisted the page. Must be one of the other supplementary ‘protection’ features. Playing with settings now.

    Oh and you’re right about it being hideously dark! Terrible, terrible text font.

    Edit: FOUND IT! googleusercontent needs to be whitelisted as well, even though it doesn’t show up in the noscript menu for my site. Thanks dev!

    Edit 2: Forgot to ask, how do I specify separate font usage for sidebars, widget text, the nav menu and header/tagline ?

    • This reply was modified 9 months, 3 weeks ago by  middayminer.
    • This reply was modified 9 months, 3 weeks ago by  middayminer.
    • This reply was modified 9 months, 3 weeks ago by  middayminer.
    • This reply was modified 9 months, 3 weeks ago by  middayminer.
    #48746

    middayminer
    Participant
    Post count: 72

    Nevermind, found all of the settings by looking at the theme stylesheet. :)

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.