WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] DIfference in header on index.php and single.php (11 posts)

  1. AndreasDK
    Member
    Posted 3 years ago #

    I have installed Google Fonts on my site and used it to change the font of h1, which states the name of my blog.

    But when I clich a blog post to read it on single.php the h1 changes to default.

    Can someone help me sort this out?

  2. jkovis
    Member
    Posted 3 years ago #

    Change:

    h1 {
        font-family: 'Bentham', arial, serif;
    }

    to:

    h1,
    #header #title {
        font-family: 'Bentham', arial, serif;
    }
  3. AndreasDK
    Member
    Posted 3 years ago #

    Which file is that in?

    I cannot find it in single.php, which i suspect to be where the mistake is.

    single.php

  4. jkovis
    Member
    Posted 3 years ago #

    I have installed Google Fonts on my site

    - where did you add the google web font styles?

    It looks like it's in your theme's header.php or possibly in functions.php.

  5. AndreasDK
    Member
    Posted 3 years ago #

    I just added them through the Add plug in menu.

    The code is neither in functions.php, header.php or single.php.

  6. jkovis
    Member
    Posted 3 years ago #

    I'd try adding this code to the bottom of your theme's style.css file:

    #header #title {
        font-family: 'Bentham', arial, serif;
    }
  7. AndreasDK
    Member
    Posted 3 years ago #

    Unfortunately, that did not help.

  8. jkovis
    Member
    Posted 3 years ago #

    I looked at your theme's style.css file and did not see the added style code. Regardless, I also saw which plugin you were using. There should be a Custom CSS textarea for the "Bentham" font.

    Add this to the custom CSS textarea and save:

    #header #title {
        font-family: 'Bentham', arial, serif;
    }
  9. AndreasDK
    Member
    Posted 3 years ago #

    Is this what you mean? (in google-fonts.php)

    <p><strong>Custom CSS:*</strong></p>
    <textarea name="googlefont1_css" cols="70" rows="8" id="googlefont1_css">
    <?php echo stripslashes($this->options['googlefont1_css']) ; ?>
    #header #title {
       font-family: 'Bentham', arial, serif;
    }
    </textarea>

    Sadly this does not change anything.

    Youre quite right the code isnt in style.php.
    I deleted it again after seing that it just gave me some mistakes rather than accomplish what I was trying to do.

  10. jkovis
    Member
    Posted 3 years ago #

    Is there not a plugin option page in the WordPress admin that looks like this where you can set custom CSS styles?

  11. AndreasDK
    Member
    Posted 3 years ago #

    Yes there is and that did the trick.

    Thank you ever so much :-)

Topic Closed

This topic has been closed to new replies.

About this Topic