Tagged: 

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #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, 10 months ago by Maciej.
    #570443

    Hi 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,
    Elliott

    #570507

    It’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!

    #571107

    Hey!

    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,
    Ismael

    #577773

    Ok, 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.

    #577775

    how 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

    #577776

    Yes. 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, 9 months ago by Maciej.
    #577888

    All 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

    #577891

    Ok. I think I have to explain again. CSS rules in style.css in my child theme don’t work. What can I do?

    #578514

    Hey!

    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 Kashyap

    #578797

    yes 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, 9 months ago by Guenni007.
    #578808

    btw:

    /*
    * 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, 9 months ago by Guenni007.
    #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!
    Andy

    #584188

    Hello…
    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 properties

    Thanks

    #584956

    Hi!

    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

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