How to change font for h1, h2….h6 ?

  • dramajan



    I found an extra “}” in my code before the change for the borders. I have now effectively removed the grey borders. (That was just a test situation anyway). So child theme does seem to be functioning.

    Now I’m back to trying to figure out how to change the font for the subheads (h1, h2, h3, etc).

    I’ve already checked the css – there is not an extra “}” anywhere!




    Did you try with declaration !important, like this:

    .entry-content h2 { font-family: georgia !important; }

    Try to put the code in graphene options / custom css…



    Ooo my god, what does PHP code do in your style.css 🙂

    Remove this:

    <?php if (!is_page()) : ?>
    <h1 class="post-title">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__('Permalink Link to %s', 'graphene'), the_title_attribute('echo=0')); ?>"><?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?></a>
    <?php do_action('graphene_post_title'); ?>
    <?php endif; ?>

    from style.css in your child theme



    The “important” code worked beautifully! h2 font family now displays as Georgia.

    .entry-content h2 { font-family: georgia !important; }

    Thanks for your help, Luco! Problem solved.

    FYI, that nasty piece of code you advised me to remove was inserted in order to remove PAGE titles, but maintain POST titles. I found it in a wp forum. Here’s the link:

    Per your advice, I have now removed it. Replaced it with this:

    .page .post-title, .page .post-title a, .page .post-title a:visited {

    display: none;


    which does the same thing. PAGE titles are gone. POST titles remain.

    Thank you!



    Glad you solved it.

    Anyway, that piece of PHP code you mentioned supposed to go in loop.php . NOT in style.css!

    PHP code goes in *.php files 🙂



    Yes, I realized that when I reread the wp forum post. As they say, I know just enough to be dangerous. Sigh.

    Thanks again for your help.


    Kenneth John Odle


    Put code in between backtick (


    ) characters. It’s usually located above the Tab key on your keyboard.

    This is not so important with CSS (although it makes it easier to read), but it is important with PHP and other scripting languages.

Viewing 7 posts - 11 through 17 (of 17 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.