Customize RTL font.. - by AdSh - on WordPress WooCommerce support

This topic has 4 replies, 2 voices, and was last updated 6 years, 1 months ago ago by Rose Tyler

  • Avatar: AdSh
    AdSh
    Participant
    March 18, 2018 at 23:20

    Hi,

    I want to use “JF Flat” font for all texts, titles, menus, footer, header….etc. in the RTL pages.

    Please let me know how to do that?

    Thanks

    Please, contact administrator
    for this information.
    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 19, 2018 at 10:23

    Hello,

    “JF Flat” is not Google font, you need download its files and upload to your site folder, then include it into the theme using @font-face (read here http://www.wpbeginner.com/wp-themes/how-to-add-custom-fonts-in-wordpress/ , section “Adding Custom Fonts in WordPress Using CSS3 @font-face”).

    Regards

    Avatar: AdSh
    AdSh
    Participant
    March 19, 2018 at 10:31

    Hi,

    thanks for your answer.

    Then I will use (El Messiri) google font, BUT I want to use this font only in the RTL pages from my website, please let me know how to do that?

    Thanks

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 19, 2018 at 15:35

    Hello,

    You can add this code in functions.php file of child theme:

    if ( is_rtl() ) {
          add_action('wp_head', 'etheme_custom_font');
    }
    function etheme_custom_font() {
          ?>  <link href="https://fonts.googleapis.com/css?family=El+Messiri" rel="stylesheet"> <?
    }

    and use this custom css:

    .rtl * {
        font-family:  "El Messiri" !important;
    }

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.