Tagged: wpml
-
AuthorPosts
-
January 22, 2016 at 4:16 pm #570175
Hello.
Can you help me ? I have 5 languages on my site. In every language I have seperate styles. I would like to move them to my child theme style.css file (to avoid modyfing css from every language, they are same for everything) but when I move my styles and remove them from my theme options, they don’t work. What I have to do to make them work from style.css?
Thank you.
- This topic was modified 8 years, 11 months ago by Maciej.
January 23, 2016 at 4:12 am #570443Hi rimlightstudio!
Try adding an !important override like so.
a { color: red !important; font-size: 12px !important; }
You may need to add a specifier for which language your using as well. Send us a link to your page and we’ll take a look.
Regards,
ElliottJanuary 23, 2016 at 10:57 am #570507It’s not that problem. I know about “important” and I don’t need my css to be language dependent. Rather opposite :)
I’ll try to explain.
I have my css rules in theme options right now. What I need is to have css in my style.css file in child theme. When I move my styles from theme option to file, they are not working. Same styles just diferrent place. It looks like style.css is not registered or loaded?
Do I have to use wp_enqueue_style or something else to get them working?Thank you!
January 25, 2016 at 6:35 am #571107Hey!
The style.css file is already registered and enqueued in the functions.php file. Please post the url to the site so that we can check it. Or view the page source then look for the style.css file. If it’s not there then there’s something wrong with the theme.
<link rel='stylesheet' id='avia-style-css' href=http://www.yoursite.com/wp-content/themes/enfold_child/style.css?ver=2' type='text/css' media='all' />
Best regards,
IsmaelFebruary 4, 2016 at 2:28 pm #577773Ok, thanks, please have a look.
My main language is polish, and there styles there are proper one. On other languages some fonts are different and not all changes in css are working compared to PL part.Thank you.
February 4, 2016 at 2:36 pm #577775how do you achieve the different languages – via WPML ?
on WPML the Enfold Options dialog is in correlation to each language. It means, that every Language has its own Enfold Options. Even the landing Page could be different.
if i have to install a multilanguage site i start finishing the site for one Language – than i go to import/export of Enfold an export the theme settings file than change the language ( on top of enfold options dialog there are the flags – or a left tab will show you on which language you are) and import that theme settings file.
If you have different rules for each language there is no other way to export each manually paste it in that field
February 4, 2016 at 2:41 pm #577776Yes. There is WPML and I have copied all css to every language from my main (PL) site. And even after same css rules are in every language, fonts and other parts looks different. And I don’t want to have different styles for every language, I need to have same style for every language. And best option for me is to have styles in style.css file, to edit them in only one place. And as I mentioned before, when I move all ruses from theme options to style.css, custom rules are not working.
- This reply was modified 8 years, 10 months ago by Maciej.
February 4, 2016 at 5:36 pm #577888All the other enfold options don’t affected by only copying the quick css to the other language – so my tip choose your default languag (polish) export theme settings file – change language – import theme settings file
February 4, 2016 at 5:38 pm #577891Ok. I think I have to explain again. CSS rules in style.css in my child theme don’t work. What can I do?
February 5, 2016 at 2:58 pm #578514Hey!
There are many things you need to consider.
The order in which style sheets are loading
The specificity of a css rule
Class names with #ID has more importance etc etc
It’s a bit more complicated to explain why your CSS is not working you may want to try searching for solution on sites like stack overflow.Try this after you setup the child theme go to appearance > editor > styles.css
And let us know if it is blank or has all the styles you added in the child theme.
If it is blank then the stylesheet is not connected to the main theme properly
If you see all the styles here it’s good to go.Send us your wordpress login details in private so we can take a closer look…
Cheers!
Vinay KashyapFebruary 5, 2016 at 10:09 pm #578797yes i know what you want. you try to let the quick css empty and transform the whole thing to Child Theme style css.
But all those settings on Enfold Options are most language specific too!
So you have to change it for every language again. My advise is made by 3 or 4 clicks with your mouse (for each language)______
do you really be sure that they don’t work – or are they overwritten by a more specific rule.
f.e. in your child theme style.css you set a rule :
#header a { color: #900}
but via Enfold Options the main menu color is set via the class: header_color
this is the more specific rule (only the important setting may overwrite this rule)
so have a look via Webdeveloper Tools or equivalent tools if your style.css rule exists or not- This reply was modified 8 years, 10 months ago by Guenni007.
February 5, 2016 at 10:20 pm #578808btw:
/*
* PLEASE DO NOT EDIT THIS FILE!
*
* This file is only in your themefolder for WordPress to recognize basic theme data like name and version
* CSS Rules in this file will not be used by the theme.
* Instead use the custom.css file that is located in your themes /css/ folder to add your styles.
* You can copy a style rule from any of your css files and paste it in custom.css and
* it will override the original style. If you just want to add small css snippets you might also
* want to consider to add it to the designated CSS option field in your themes backend at: Theme Options->General Styling
*/this is from style.css of enfold theme so try to use custom.css instead
- This reply was modified 8 years, 10 months ago by Guenni007.
February 10, 2016 at 10:45 am #580949@Guenni007
Thank you as always for helping out!
@rimlightstudio
Let us know if you still need help with this issue. Otherwise feel free to open a new ticket for a new question.Cheers!
AndyFebruary 16, 2016 at 2:36 pm #584188Hello…
After install the WPML plugin and change the language loses all css properties. I have two language. =( I have two languages .. the first is Swedish and the second is English. In the second loses css propertiesThanks
February 17, 2016 at 9:31 pm #584956Hi!
Please add the custom CSS code to Enfold > General Styling > Quick CSS and let us know if it works.
If the above works correctly for you there is no reason why it should not work in a child theme CSS.
Copy the whole CSS from Quick CSS and goto Appearance > Editor > Child theme CSS
Add your custom css and save it it should work fine. if you have any issues please create a temporary user with ‘administrator’ role and share in private content with permission to deactivate all plugins and add custom code if necessary to help you better.
Regards,
Vinay Kashyap -
AuthorPosts
- You must be logged in to reply to this topic.