Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1006809
    nadinedomnink
    Participant

    hi, i would like to change the size, font and color just for a single word within my text. can you tell me how to do it? i would like to use a font i uploaded from typekit for one word only. is that possible? thanks in advance!
    nadine

    #1006823
    Christopher
    Moderator

    Hi there,

    Please switch to text tab of editor and wrap the word within <span style="color:red,font-size:15px;font-family:cursive;">word</span>.

    Hope it helps.

    #1009656
    nadinedomnink
    Participant

    Hi, the code doesn’t work properly. The font changes, but not the color and the size. I tried it with this code: <span style=”color: #003366;”><span style=”font-family: ‘Arial’, thin;”><span style=”font-size: 40px;”><span lang=”de-DE”>Erbengemeinschaft</span></span></span></span>

    which works, but just with fonts which are part of the system like Arial (system). I would like to use a font like Lato (google) or Freight Text Pro (typekit) for a single word within my text. Is that possible, too?

    Thanks a lot!

    #1009973
    Jade
    Moderator

    Hi Nadine,

    Yes, you can use TypeKit plugin that you call install from the Addons page so that you could use TypeKit fonts. Then you may add a custom CSS to be able to use it.

    To use the Lato font, add the font-family to the span element then add this code in the customizer:

    @import url(https://fonts.googleapis.com/css?family=Lato);

    #1010501
    nadinedomnink
    Participant

    Hi, I added the code in the customizer, but it still doesn’t work. When I want to change the font the system just accepts the “normal” fonts such as Arial, Times New Roman etc.
    I already use the typekit plug in and in the customizer I can use the font I chose, but I can’t use it for a single word within a text…any other ideas?

    #1010537
    Friech
    Moderator

    Hi There,

    Might be something is conflicting, would you mind providing us the site URL and the text that you want to style?

    Thanks.

    #1010613
    nadinedomnink
    Participant
    This reply has been marked as private.
    #1010622
    Rue Nel
    Moderator

    Hello There,

    When viewing the url, I am seeing an error (http://prntscr.com/b8kugd). It appears that you are experiencing PHP memory exhaustion. We recommend that you increase your memory allocated to PHP. To increase it, please edit your wp-config.php file and insert these lines:

    define( 'WP_MEMORY_LIMIT', '256M' );
    define( 'WP_MAX_MEMORY_LIMIT', '512M' );

    You can add it before the line
    /*That's all, stop editing! Happy Blogging. */

    Please let us know how it goes.

    #1010653
    nadinedomnink
    Participant

    I don’t dare do it on my own…but if you click twice the error disappears…can you try again?
    On Monday I will ask a friend about changing the Memory Limit…

    #1010696
    Rue Nel
    Moderator

    Hi Again,

    Okay then.

    By the way, I have check “Freight Text Pro” in Google fonts but there was no font with that name.

    If you need to apply a custom font, please check out this topic to know how: https://community.theme.co/forums/topic/custom-font-2/#post-142444

    #1011429
    nadinedomnink
    Participant

    no, freight text pro is not a google font, but a font from typekit. it appears in my customizer and now i would like to use it for a single word within my text. but that doesn’t matter. I would also like to use “Lato” oder “Candara” which both don’t work either and are google fonts.
    as i wrote i can only change the font when i replace it by a “normal” font such as Arial or Times New Roman and not with LATO; CANDERA or FREIGHT TEXT PRO.

    You gave me this code and it didn’t work: @import url(https://fonts.googleapis.com/css?family=Lato);

    any idea to help me?

    thanks a lot!

    #1011437
    nadinedomnink
    Participant

    what I am asking just refers to changing the font for a single word, not the whole text!

    #1011685
    Nabeel A
    Moderator

    Hi again,

    Try adding the following code in your child theme’s functions.php file:

    add_action('wp_head','custom_font');
    function custom_font() { 
    ?>
    <link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
    <?php 
    }

    And the in your text you can use it like this:

    <p>Lorem <span style="font-family: 'Lato', sans-serif;">Ipsum</span> dollor</p>

    Hope this helps!

  • <script> jQuery(function($){ $("#no-reply-1006809 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>