Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1492037

    Guys,

    My website has 2 languages English & Arabic.

    Where can I change the Arabic font style to ‘Cairo’, sans-serif

    Thank you

    #1492045

    Hey tariqyacoub82,

    Thank you for the inquiry.

    Unfortunately, it’s not possible to set a different font for each language from the theme options. You will need to modify this with custom css. If you can create a test page and share the site URL, we’ll check it out.

    Best regards,
    Ismael

    #1492048

    Hi Ismael,

    This is the test page link

    #1492097

    Hi,

    Thank you for the link.

    Add this code in the functions.php file to load the Cairo font:

    function av_load_google_fonts() {
        wp_enqueue_style(
            'google-fonts-cairo',
            'https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap',
            array(),
            null
        );
    }
    add_action('wp_enqueue_scripts', 'av_load_google_fonts');

    After that, add the following css to make the font the default body text:

    #top, body, p, span, li, a, h1, h2, h3, h4, h5, h6, input, textarea, button {
        font-family: 'Cairo', sans-serif;
    }

    Let us know the result.

    Best regards,
    Ismael

    #1492106

    Hi Ismael,

    where should I add the second code?

    Also, Can I share with you FTP login so you can do it for me ?

    #1492109

    Ismael,

    I need this language to be installed only for Arabic not for english.

    #1492156

    Hi,

    Thank you for the update.

    We adjusted the code so that the Cairo font only loads on the Arabic version of the site.

    function av_load_google_fonts() {
         $locale = get_locale();
    
        if (strpos($locale, 'ar') === 0) {
            wp_enqueue_style(
                'google-fonts-cairo',
                'https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap',
                array(),
                null
            );
        }
    }
    add_action('wp_enqueue_scripts', 'av_load_google_fonts');

    This is the updated css code:

    [lang="ar"],
    [lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] h4, [lang="ar"] h5, [lang="ar"] h6,
    [lang="ar"] p, [lang="ar"] span, [lang="ar"] li, [lang="ar"] a,
    [lang="ar"] input, [lang="ar"] textarea, [lang="ar"] button {
        font-family: 'Cairo', sans-serif;
    }

    Best regards,
    Ismael

    #1492221

    Dear Ismael,

    Thanks for your support.

    Some text is still not loading the Cairo font. Please check and support.

    https://greensvill.com/wp-content/uploads/2025/12/Arabic-Font-scaled.png

    #1492234

    Hi,

    Thank you for the screenshot.

    Adding this css code should help adjust the heading fonts.

    [lang="ar"] #top #wrap_all .all_colors h1,
    [lang="ar"] #top #wrap_all .all_colors h2,
    [lang="ar"] #top #wrap_all .all_colors h3,
    [lang="ar"] #top #wrap_all .all_colors h4,
    [lang="ar"] #top #wrap_all .all_colors h5,
    [lang="ar"] #top #wrap_all .all_colors h6 {
        font-family: 'Cairo', sans-serif;
    }

    Best regards,
    Ismael

    #1492244

    Awesome support guys,

    Thank you and all the team at kriesi.

    #1492261

    Hi,

    Great, I’m glad that Ismael could help you out. We’ll close this thread for now then, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Arabic font Change’ is closed to new replies.