• Resolved icakeov

    (@itucakov)


    Hi this might sounds like a standard thing that people do, but I’m not sure how to do it.
    I have created a child theme for my twenty twelve theme.

    When I work on my fonts in the kitchen sink area I can select a style that I’d like, like paragraph, different headers, etc.

    Can I define a new style/font in my child theme with my own name that will show in that drop-down-menu when I’m editing my text? Or is that maybe not a good idea and I should stay with pre-defined styles? I guess I can always change the colors/sizes anyways without the need to create new styles..

    I have a feeling this is easy, but I haven’t been able to google it easily.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can create all the styles you want in the style.css for your child theme. Getting them to show up in the editor’s drop down and persist over updates was more of a hassle than it was worth last time I looked into it, though.

    You can always switch to the Text view for a given post and hard-code your styles in there by adding HTML tags with the appropriate class names for the styles you created in your child theme’s style.css.

    For example, lets say you wanted to add a font called NewFont. You could set up a class in your child theme’s style.css like this:

    .newclassname {
    font-family: “NewFont”;
    …more values here
    }

    Then in the Text view of the post, you can add the font to some text like this:
    <span class="newclassname">Text here.</span>

    Of course, all of CSS is available to you if you take this route, not just fonts.

    Thread Starter icakeov

    (@itucakov)

    This is great, thanks linux4me2!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Creating a new style/font in wordpress?’ is closed to new replies.