Tagged: 

Viewing 30 posts - 1 through 30 (of 34 total)
  • Author
    Posts
  • #253604

    Hello,

    How to enable the RTL option?
    I checked this post but still don’t know how to set WordPress to RTL language so that the Enfold RTL stylesheet will be included automatically. https://kriesi.at/support/topic/how-to-enable-the-rtl-option/

    Thanks

    #253605

    I used this in wp-config.php file but no change:

    define('WPLANG', 'ar_SA');

    #253608

    Hey!

    Afaik ar_SA doesn’t exist (see http://wpcentral.io/internationalization/ ). Try “ar” only and download the right wordpress files: http://ar.wordpress.org/

    Cheers!
    Peter

    #253612

    I tried ‘ar’ but it didn’t work.

    How do I enable RTL? I don’t want to change the back end, only front end.

    #253680

    Hi!

    Thank you for the update.

    If you don’t mind, we would like to check the website. Please edit functions.php file, look for this code on line 304:

    if ( is_rtl() ) {
    			wp_enqueue_style(  'avia-rtl',  $template_url."/css/rtl.css", array(), '1', 'screen' );
    		}

    Replace it with:

    wp_enqueue_style(  'avia-rtl',  $template_url."/css/rtl.css", array(), '1', 'screen' );
    

    The is_rtl check if wordpress is using another locale language other than default U.S English. Since you don’t want to change the backend, we need to remove that function. Let us know if it works.

    Cheers!
    Ismael

    #253702

    But will this still work is I update the theme or WordPress in the future?

    #254163

    Hey!

    If you use a child theme you can have this mod and be able to update the theme, this code would need to be added in the child functions.php:

    wp_enqueue_style(  'avia-rtl',  get_template_directory()."/css/rtl.css", array(), '1', 'screen' );
    

    Best regards,
    Josue

    #269605

    Hello,
    I did all the above, but it didn’t work.

    In wp-config.php, I used:
    define('WPLANG', 'ar')
    I replaced the two lines mentioned by @Ismael with:
    wp_enqueue_style( 'avia-rtl', get_template_directory()."/css/rtl.css", array(), '1', 'screen' )
    in both enfold and enfold-child themes.
    Please help on this issue
    Thanks and regards

    • This reply was modified 10 years, 5 months ago by mndawood.
    #269608

    Hey!

    The WPLANG value for Arabic should be:

    define('WPLANG', 'ar_AR')
    

    Cheers!
    Josue

    #269617
    This reply has been marked as private.
    #269620

    Hi!

    Look for fonts here:
    https://www.google.com/fonts

    After you found the font of your preference, add this to the theme functions.php:

    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Font Name Here'] = 'Font Name Here:400,600,800'; // <- these are the font weight options
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Font Name Here'] = 'Font Name Here:400,600,800'; // <- these are the font weight options
    return $fonts;
    }

    Regards,
    Josue

    #269624

    Thank you for the help.
    I added the code in functions.php of the child theme, and the two fonts show well into the two drop downs; body and heading.

    I used this in child style sheet:

    
    @import url(https://fonts.googleapis.com/earlyaccess/droidarabickufi.css);
    @import url(https://fonts.googleapis.com/earlyaccess/droidarabicnaskh.css);
    

    The problem is that the fonts didn’t render into page text at all.
    I dont know what might be the cause, I tried many times.

    Please advise

    thank you for your patience.

    #269625

    Hello,
    It is done!
    Some little typos in the font name; I used apostrophes in place of spaces (like I do in slider font name).
    I am pleased you helped me to this fine result.
    Thank you very much.
    Have a great day, @Josue :)

    #269632

    You are welcome, glad we could help :)

    Regards,
    
Josue

    #311338

    Hi. It still didn’t work. This is what I did:

    in wp-config.php I used:

    
    define('WPLANG', 'ar_AR');
    

    In the child theme, I added this to the child functions.php:

    
    wp_enqueue_style(  'avia-rtl',  get_template_directory()."/css/rtl.css", array(), '1', 'screen' );
    

    I also added this:

    
    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Droid Arabic Kufi'] = 'Droid Arabic Kufi';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    
    $fonts['Droid Arabic Kufi'] = 'Droid Arabic Kufi';
    return $fonts;
    }

    Why it didn’t work? Still no RTL.

    • This reply was modified 10 years, 2 months ago by aymanati.
    #311341

    Hi @aymanati,

    Can you post the link to your website please?

    Regards,
    Josue

    #311356

    yes:
    http://almobadarat.com/site/

    I can give you access if needed.

    #311374

    Hey!

    The problem seems to be that the rtl stylesheet doesn’t exist on the server – http://almobadarat.com/site/home/mobadara/public_html/site/wp-content/themes/enfold/css/rtl.css?ver=1

    I’d suggest re-installing via FTP.

    Best regards,
    Josue

    #311400
    #311413

    Try the following; add this code to your functions.php file:

    function enqueue_rtl() {
      wp_enqueue_style(  'avia-rtl',  get_template_directory()."/css/rtl.css", array(), '1', 'screen' );
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_rtl', 100 );
    
    #311472

    Thanks. I added it but it’s not working. I’ll give you access to the website in a next private reply.

    #311473
    This reply has been marked as private.
    #311574

    It’s done, i used this code:

    function enqueue_rtl() {
      wp_enqueue_style(  'avia-rtl',  get_template_directory_uri()."/css/rtl.css", array(), '1', 'screen' );
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_rtl', 100 );
    #311575

    Thanks. RTL is fixed. But the font is not rendered.

    I used this

    
    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Droid Arabic Kufi'] = 'Droid Arabic Kufi';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    
    $fonts['Droid Arabic Kufi'] = 'Droid Arabic Kufi';
    return $fonts;
    }
    
    #311576

    Hey!

    Try adding this code to the Quick CSS:

    body{
        font-family: "Droid Arabic Kufi" !important;
    }

    Cheers! 
    Josue

    #311578

    No luck. Didn’t work. Not only the font type, even the font sizes changes are not reflected.

    #311580

    It’s working now, you had a typo in this code that was blocking all the code below:

    #top .av_header_glassy.av_header_transparency #header_main { background-color: rgba(255,255,255,0.6); 
    

    Missing “}”.

    #311597

    Great :)
    Thanks

    #311599

    You are welcome, glad to help :)

    Regards,
    Josue

    #311602

    Sorry problem again.

    I edited an element in the Advanced Styling, then removed it. Now the font type won’t render like before!

Viewing 30 posts - 1 through 30 (of 34 total)
  • You must be logged in to reply to this topic.