Title: using Option Tree IDs in dynamic.css
Last modified: August 24, 2016

---

# using Option Tree IDs in dynamic.css

 *  Resolved [SaeedTJ](https://wordpress.org/support/users/saeedtj/)
 * (@saeedtj)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/)
 * 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
 * [https://wordpress.org/plugins/option-tree/](https://wordpress.org/plugins/option-tree/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Thread Starter [SaeedTJ](https://wordpress.org/support/users/saeedtj/)
 * (@saeedtj)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023336)
 * aloo??
 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023366)
 * What do you mean nothing happened, are any values being saved to `dynamic.css`?
 *  Thread Starter [SaeedTJ](https://wordpress.org/support/users/saeedtj/)
 * (@saeedtj)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023393)
 * > 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
   😉
 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023394)
 * 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.
 *  Thread Starter [SaeedTJ](https://wordpress.org/support/users/saeedtj/)
 * (@saeedtj)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023395)
 * > 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?
 *  Thread Starter [SaeedTJ](https://wordpress.org/support/users/saeedtj/)
 * (@saeedtj)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023397)
 * 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.jpg](http://uupload.ir/files/lzo1_ot-1.jpg)
 * second 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.jpg](http://uupload.ir/files/gog_ot-2.jpg)
 * third I changed the setting and saved.
    This image: [http://uupload.ir/files/c7ri_ot-3.jpg](http://uupload.ir/files/c7ri_ot-3.jpg)
 * **BUT NOTHING HAPPENED!!!**
    Please help… PLEASE
 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023398)
 * You don’t edit `dynamic.css` directly. You create a CSS option type and paste
   your CSS in there.
 *  Thread Starter [SaeedTJ](https://wordpress.org/support/users/saeedtj/)
 * (@saeedtj)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023400)
 * > 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?
 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023401)
 * [https://github.com/valendesigns/option-tree-theme](https://github.com/valendesigns/option-tree-theme)
 *  Thread Starter [SaeedTJ](https://wordpress.org/support/users/saeedtj/)
 * (@saeedtj)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023403)
 * 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 resolved
 *  [Kishor Meher](https://wordpress.org/support/users/kishor91/)
 * (@kishor91)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023459)
 * Hello SaeedTJ
 * will you please help me. I am unable to add dynamic css from option tree.
 * thanks advance
 *  Thread Starter [SaeedTJ](https://wordpress.org/support/users/saeedtj/)
 * (@saeedtj)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023460)
 * >  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

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘using Option Tree IDs in dynamic.css’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/option-tree_363534.svg)
 * [OptionTree](https://wordpress.org/plugins/option-tree/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/option-tree/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/option-tree/)
 * [Active Topics](https://wordpress.org/support/plugin/option-tree/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/option-tree/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/option-tree/reviews/)

## Tags

 * [OptionTree](https://wordpress.org/support/topic-tag/optiontree/)

 * 12 replies
 * 3 participants
 * Last reply from: [SaeedTJ](https://wordpress.org/support/users/saeedtj/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/using-option-tree-ids-in-dynamiccss/#post-6023460)
 * Status: resolved