• This is primarily informational for anyone who runs into this problem that I just spent the day trying to solve.

    Problem:
    Using a purchased theme I found that I wanted to change the font of the theme from the Times New Roman Font family to Arial Font family. I went into the css and changed all the appropriate stlyes to Arial, Helvetica, sans-serif. So all the text on the pages and posts switched easily to the new Font Family. However all of the page headings and post titles stayed as Times New Roman. After searching all the css code I still could not find even one instance of the word “times” in my css.
    I ended up contacting the company who designed the theme. They directed me to install the fonts that came with the theme. However, using a brand new Macbook Pro, I knew that I already had the correct fonts (obviously Arial is a fairly standard font pre-installed on nearly every computer on the market for the last 15 year or so.) Still I tried their recommendation of installing the fonts.
    No change
    I decided that somehow there must be an external file that was changing the Font Family back to Times for anything tagged as a heading (h1, h2, h3 and so on) AFTER the css was loaded. In fact I noticed that if the page loaded slowly that initially everything was in Arial but as soon as the page was done loading the headings would switch back to Times.

    Solution:

    After searching all the files that came with my theme for the word “Times” I found that in the header.php file that came with the theme there was a line of code amongst the Script tags which looked like this:

    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/Times_New_Roman_400.font.js"></script>

    I decided to just try commenting this out by adding <!-- --> around it. and BOOM. fixed! Everything that was carrying a heading of h1 h2 h3 h4 h5 switched to what I had it set to in my Stylesheet file.

    So if you find there are some fonts you can’t get to change within the css of your theme, Check the header.php file to see if anything is calling for it there.

  • The topic ‘Can't change Font Family for headings or page titles ( h1, h2, h3 . . . )’ is closed to new replies.