Jump to content
Sign in to follow this  
stalin012

Using Google Font (not in typography) to change H1 font only

Recommended Posts

stalin012

Hi, the typography settings are great, BUT I would like to use a specific Google font (in this case 'Covered by your grace') for the H1 headline only. For the rest I want to use the settings in the typography settings. How do I do that? I am using Platform pro and platform base.

Share this post


Link to post
Share on other sites
stalin012

OK, yes, but how much of the code that Google specifies do I need to add? Is there a specific area for the H1 code currently in the theme or do I override this by adding that? ie. can i locate and just make the change to the CSS or do I have to add it?

Share this post


Link to post
Share on other sites
Kate

The CSS you add to "custom code" or to your "base" theme will override the default CSS.

Share this post


Link to post
Share on other sites
cmunns

Which header are you specifically trying to change? All main headers? This font is not listed in the current font options drop down correct? If you have a link I can at least check to see if it's been added.

Share this post


Link to post
Share on other sites
stalin012

the site is at http://verbalastigar.se The font I want to use for H1 headlines only is the Google font "Covered by your grace". I specifically do not want to use it on H2 and below (where i use Ubuntu, another Google font which is available in the typeface dialogue inside pagelines/wordpress). My understanding is that I should add a custom CSS for H1 setting it to use Covered by your grace (in base.css, overriding other CSS settings), but here is where I run into trouble. I need to reference the Google font and I need to make the correct CSS call for the headline, which it seems that I am unable to get correct So, what I want to achieve is that ALL H1 headlines use Covered by your grace, all H2-and below use Ubuntu, (including features, boxes etc). thankful for any help!

Share this post


Link to post
Share on other sites
stalin012

Oh, just for clarity, I have currently removed all attempts at custom CSS coding in base.css

Share this post


Link to post
Share on other sites
stalin012

Guys and gals, anyone that could help? still got this problem... I want to change the H1 header to use Google font Covered by your grace, header H2 etc to use a different typeface (ubuntu, also using Google Fonts). For this I have to add some custom CSS code but I can't get it to work properly. Anyone?

Share this post


Link to post
Share on other sites
Simon

Staffan, open functions.php in platformbase there is an example filter to add fonts, that is where the ubuntu font is actually added to the system. Use it to add you new font.

Share this post


Link to post
Share on other sites
stalin012

Thanks, and yes I know, though I only want to change the H1, and in PageLines I set the font for all headlines (h1 etc) in the same place, i.e. I cannot specify a different font for H1 than for H2, so for this I need to add custom CSS for the H1 as well. Do you see what I mean? In bulletpoints: * Making sure that covered by your grace is loaded from Google * setting the font specifically for H1 to Covered by your grace * rest of H1 use Ubuntu as set in pagelines Staffan

Share this post


Link to post
Share on other sites
cmunns

You can apply the Covered-by-your-grace font manually in the custom css option or in Base.css Use FireBug or the Chrome developer toolbar to pinpoint the selector you want to change.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×