Community Forums › Forums › Archived Forums › Design Tips and Tricks › Fonts- H2 subheaders and body text
Tagged: fonts
- This topic has 5 replies, 3 voices, and was last updated 10 years, 1 month ago by
Victor Font.
-
AuthorPosts
-
February 12, 2015 at 12:37 am #140571
manavecplan
MemberHey,
I'm trying to change the font used in my H2 post/page headings and my post/page content.
The custom CSS I've used is as under:
/* Custom Post Typography---------------------------------------------------------------------------------------------------- */ .entry-title {font-family: "montserratbold", arial, sans-serif;color: #333333;text-transform: uppercase;margin-bottom: 36px;bottom-border: 5px;} .single .entry-content h2,.page .entry-content h2 {font-family: "montserratbold", arial, sans-serif;font-size: 50px;color: red;}.site-header {background-color: yellow;height: 4em;} .entry-content {font-family: "open_sansregular", Helvetica, Arial, sans-serif;} body.single {font-family: "open_sansregular", Helvetica, Arial, sans-serif;}
Despite declaring the fonts in the same way, I can only see a change effected in my post titles and not my H2 headings or my post content.
On my local setup, the post content is picking up the Open Sans font.
What am I doing wrong?
http://traffictrain.in/testFebruary 12, 2015 at 4:21 pm #140656Tonya
MemberHi,
You want to make sure that you are loading the Montserrat font in the enqueue process, as I only see Open Sans being loaded. In the enqueue_scripts() function (in your functions.php file), you want to add the following:
|Montserrat:700
just after Open+Sans.
Cheers,
Tonya
Software & Electrical Engineer and Programming Teacher ยท I’m on a mission to help developers be more awesome.
Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer BootcampFebruary 12, 2015 at 10:46 pm #140670manavecplan
MemberQuestion: Why would I be enqueueing these fonts?
I have them stored in the fonts folder and I'm loading them from there by declaring the location via CSS.
That seems to work just fine for the Post titles which is displayed in "montserratbold" just not the post sub-headers and the post text. ๐
P.S. I love the shortlink thing at the end of your post here. Nice animation touch!
February 13, 2015 at 4:01 am #140688Tonya
MemberHi again,
Sorry about that enqueing of the font. I didn't span through the stylesheet enough to discover the fonts being loaded.
For content within .entry-content, you'll need to target the specifics tags, such as .entry-content p, etc. I'm on my iPad now, so I can't see the HTML and code to see the DOM; however, give this is a try.
I'm off to dreamland. If this doesn't work for you, let me know and we'll tackle it later today.
Happy coding,
Tonya
Software & Electrical Engineer and Programming Teacher ยท I’m on a mission to help developers be more awesome.
Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer BootcampFebruary 20, 2015 at 5:27 am #141428manavecplan
MemberHey Tonya,
Tried the specific tags thing, no go. To be specific, I've tried the p tag and that's not worked.
Can you help? ๐
February 20, 2015 at 8:07 am #141446Victor Font
ModeratorYou've got other problems going on. Your fonts aren't downloading. I am using Firefox on a Mac and receive the following error when I look at your test page:
downloadable font: download failed (font-family: "montserratbold" style:normal weight:normal stretch:normal src index:0): status=2147746065
source: http://traffictrain.in/wp-content/themes/bossa-nova/fonts/montserrat/data:application/x-font-woff;charset=utf-8;Check the permissions on you files.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet? -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.