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

  • dramajan

    #32335

    FALSE ALARM.

    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!

    Thanks.

    Anonymous

    #32336

    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…

    Anonymous

    #32337

    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'); ?>
    </h1>
    <?php endif; ?>
    }

    from style.css in your child theme

    dramajan

    #32338

    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:

    http://wordpress.org/support/topic/unable-to-locate-pagephp-file-to-remove-page-titles-in-graphene-theme?replies=6

    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!

    Anonymous

    #32339

    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 🙂

    dramajan

    #32340

    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.

    Mod

    Kenneth John Odle

    #32341

    Put code in between backtick (

    Code:
    `

    ) 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)

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!