Home › Forums › WoodMart support forum › RTL CSS file generator
RTL CSS file generator
- This topic has 8 replies, 2 voices, and was last updated 4 years, 5 months ago by Artem Temos.
-
AuthorPosts
-
July 21, 2020 at 8:54 am #212836
emadParticipantHi
I have a multi language website using WPML English and Arabic is work fine and your theme is perfect but something i did’t get’t i use CSS file generator for RTL language but is effect for all website even English language how generate RTL css only for Arabic
i make a child theme and it has rtl.css i use it for my custom codes am not sure is effect in CSS file generator or there anther a way to do thatThanks
July 21, 2020 at 9:08 am #212842
Artem TemosKeymasterHello,
Thank you so much for purchasing our theme and contacting our support center.
Yes, the CSS generator replaces theme’s CSS files with generated one and it may be either RTL or LTR. Unfortunately, it is not possible to use CSS generator on websites that have both Arabic and English versions.
Kind Regards
XTemos StudioJuly 21, 2020 at 10:53 am #212849
emadParticipantHi
thank you for fast response i contact with WPML support they give me the below codefunction enqueue_styles() { if(ICL_LANGUAGE_CODE == 'en'){ //english wp_enqueue_style( 'style-css', get_template_directory_uri() . "/style-.css", array(), null ); } if(ICL_LANGUAGE_CODE == 'ar'){ //arabic wp_enqueue_style( 'style-rtl.css', get_template_directory_uri() . "/css/style-rtl.css", array(), null ); } } add_action( 'wp_enqueue_scripts', 'enqueue_styles' ); function se_remove_script() { if(ICL_LANGUAGE_CODE == 'en'){ //english wp_enqueue_style( 'style-css', get_template_directory_uri() . "/style-.css", array(), null ); } } add_action( 'wp_print_scripts', 'se_remove_script', 99 );
is working but in Arabic the RTL style and the normal one now are merge together so be become more missy am trying blocking the normal style form Arabic if you see the code can you help me or do you think this way will work?
July 21, 2020 at 11:11 am #212857
Artem TemosKeymasterThis code has no any relation to our CSS generator. The only way to make it work correctly now is to disable the CSS generator completely. Then, our theme’s styles will be loaded and it will look well both on English and Arabic.
July 21, 2020 at 11:28 am #212863
emadParticipanthow i disable it? is there switch fo it ?
July 21, 2020 at 12:14 pm #212873
Artem TemosKeymasterYou need to go to Dashboard -> WoodMart -> CSS generator and remove the file completely.
July 21, 2020 at 12:36 pm #212885
emadParticipantworks like a charm thank you very much
July 21, 2020 at 12:37 pm #212887
emadParticipantthat code i use
function enqueue_styles() { if(ICL_LANGUAGE_CODE == 'en'){ //english wp_enqueue_style( 'style-css', get_template_directory_uri() . '/style.css', array( 'woodmart-style' ), woodmart_get_theme_info( 'Version' ) ); } if(ICL_LANGUAGE_CODE == 'ar'){ //arabic wp_enqueue_style( 'style-rtl.css', get_template_directory_uri() . "/css/style-rtl.css", array(), null ); wp_deregister_style( 'style-css', get_template_directory_uri() . '/style.css', array( 'woodmart-style' ), woodmart_get_theme_info( 'Version' ) ); } } add_action( 'wp_enqueue_scripts', 'enqueue_styles' );
July 21, 2020 at 1:17 pm #212911
Artem TemosKeymasterWe are glad that you sorted it out.
-
AuthorPosts
Tagged: RTL
The topic ‘RTL CSS file generator’ is closed to new replies.
- You must be logged in to create new topics. Login / Register