WordPress.org

Ready to get started?Download WordPress

Forums

Can I use multiple fonts in my blog title? (7 posts)

  1. DotsConnected
    Member
    Posted 2 years ago #

    Hi folks,

    I have a blog title that says "Grayscale - art by S. Issa". I'd like to know if there's any way I can give the "Grayscale" part a different font family than the rest. Any php tricks that I forgot to search for?

    Thanks!

    Take care,
    Sabra

  2. duck__boy
    Member
    Posted 2 years ago #

    Hi,

    It's not PHP that you need to be looking at for this, it's CSS.

    For example -

    <h1>Grayscale - art by S. Issa</h1> would be all in only one font.

    <h1><span class="special-font">Grayscale</span> - art by S. Issa</h1> would be in two different fonts, if they are declared in your 'style.css' file. For example (replace with the font family you want to use) -

    span.special-font{
        font-family: Arial, Helvetica, sans-serif;
    }
  3. DotsConnected
    Member
    Posted 2 years ago #

    I understand the CSS part, but I don't know where to put the span-tags. I enter the blog title in my General Settings, and these settings don't allow custom HTML tags, as far as I know.

  4. Sam Scholfield
    Member
    Posted 2 years ago #

    You could change your template files. It will most likely be in your header.php file in some <h1> tags. However this will mean that you can't edit it from your General Settings menu.

  5. DotsConnected
    Member
    Posted 2 years ago #

    Ah thanks, I'll have a look at it and see if I can make it work!

  6. duck__boy
    Member
    Posted 2 years ago #

    Yes, as Sam says you will need to look for the 'header.php' file. This however means that you would need to hard-code the tile.

    Look for something like <h1><?php bloginfo('site_title'); ?></h1> - Thats what you would need to replace.

  7. DotsConnected
    Member
    Posted 2 years ago #

    Thanks a lot for the input guys, I actually got it to work despite all my php-noobness :)

Topic Closed

This topic has been closed to new replies.

About this Topic