using Option Tree IDs in dynamic.css
-
hello everyone
I made a field which its id named bg_color
then I put this code in my dynamic.css:body { {{bg_color}} }but nothing happend!!
why??????
what should I doooooo??
I need this
-
aloo??
What do you mean nothing happened, are any values being saved to
dynamic.css?What do you mean nothing happened, are any values being saved to dynamic.css?
as documentation says, just I made a dynamic.css and linked it to the header.php then I made a field with the id that I mentioned.
and put the code
body {
{{bg_color}}
}
in the dynamic.css.
now I change the color in panel admin but it doesnt change in the real.
if it is needed I can take a screenshot of the job 😉You create a
dynamic.cssand set the permissions so the server can write to it. You do not do anything else, OT will automatically enqueue the file. If the file is empty and you have values saved in your CSS option type then the permissions are not allowing you to save to the file.You create a dynamic.css and set the permissions so the server can write to it. You do not do anything else, OT will automatically enqueue the file. If the file is empty and you have values saved in your CSS option type then the permissions are not allowing you to save to the file.
you mean the permission is the problem?
im using xampp how can I solve it?The Job I did:
first I made a field with an ID for background and color picker.
This image:
http://uupload.ir/files/lzo1_ot-1.jpgsecond I made a dynamic.css, linked it in the header and put the code with ID in it and saved.
This image:
http://uupload.ir/files/gog_ot-2.jpgthird I changed the setting and saved.
This image:
http://uupload.ir/files/c7ri_ot-3.jpgBUT NOTHING HAPPENED!!!
Please help… PLEASEYou don’t edit
dynamic.cssdirectly. You create a CSS option type and paste your CSS in there.You don’t edit dynamic.css directly. You create a CSS option type and paste your CSS in there.
what do you mean by that?
you know I’m not that professional
can you give me a better example about how can I use this color picker for background color?Really Thank you
now I understand what you were talking about.
now it’s working perfectly and I love it
I will translate both language of Plugin, Theme mode and my custom documentation with saving your name and your copyright into the Persian language.
the topic is resolvedHello SaeedTJ
will you please help me. I am unable to add dynamic css from option tree.
thanks advance
Hello SaeedTJ
will you please help me. I am unable to add dynamic css from option tree.
thanks advance
1) make a dynamic.css file in your theme root (leave it empty!).
2)add dunamic.css under your main stylesheet to the header by adding the following code:
<link href="<?php bloginfo('template_directory'); ?>/dynamic.css" rel="stylesheet" type="text/css">3) go back to optionTree settings and make add a setting which type is “CSS” and give it an ID and a name example: “CSS SETTINGS”. (there is lots of types there, like background, upload, color picker and one of them is css);
4)now add your optional setting and also give it an ID example: “bodybackground”
5) save your changes
6)Now go back to your theme setting and you’ll see 2new options which you’ve made before (I mean css_setting and bodybackground)
7) go to the css setting option and add your codes in it like this:
body { {{bodybackground}} }8)Enjoy 😉
p.n: I’m Persian so sorry if my english lang was not good
The topic ‘using Option Tree IDs in dynamic.css’ is closed to new replies.