• Resolved Mimergt

    (@mimergt)


    Hi everybody…
    I have problem tryng load my dynamic.css file.

    I have an Background option named “headbg” in my OT panel…

    I add my dynamic.css file to my theme and any problems….

    <!-- the dynamic stylesheet of OptionTree Custom css -->
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('template_directory');?>/dynamic.css" />

    ok, in my dynamic.css file i have this code:

    #header {
    {{headbg}}
    }

    The Id of my header is “header” =) so… the problem is when i load my front page… any changes… i made a lot of changes in the option panel and save it but that’s same…

    When i see the htlm code loaded by the theme the dynamic.css file is loaded but the code iside not is CSS… this is the result in the front end…

    <link href="https://the_correct/path/of_my/theme/dynamic.css" media="all" type="text/css" rel="stylesheet">
    #header {
    {{headbg}}
    }
    </link>

    I trying change the path of the dynamic.css, the file have 777 permitions and the theme folder… and the wp-content but nothing works.

    I’m searching along in the git repositories and here but any solve my problem.

    My Wp version is 3.4.2…

    Tnks alot for responses =)

    https://www.ads-software.com/extend/plugins/option-tree/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Exactly the same issue here.

    Resorting to embedding the CSS within “style” tags using PHP but the dynamic.css would be so much better.

    Plugin Author Derek Herman

    (@valendesigns)

    I just want to be sure that you are indeed using the CSS option type and adding the code below to the textarea and saving OptionTree? And that you are not pasting that code into the dynamic.css file.

    #header {
    {{headbg}}
    }

    Thank you for your message Derek.

    Well according to the documentation you are meant to create a file called dynamic.css and write the code with the template placeholders in it e.g

    #header {
    {{headbg}}
    }

    It would be great if you could elaborate on what mean as the instructions are a bit confusing.

    Plugin Author Derek Herman

    (@valendesigns)

    I thought the CSS option type was documented pretty well. What’s confusing? You add a CSS option type and insert the code into the textarea and when you save it will dynamically insert the correct CSS into the file.

    Thank you again for your reply Derek. Your support and guidance is much appreciated.

    OK I wish I would agree with you with regards to the documentation. It is a nice piece of software but the documentation could be a lot better.

    It does not specify where the CSS option type textarea should be placed. Should it be in every section or just once?

    Perhaps in a new release you could add the CSS option type textarea by default and another idea would be to generate the template placeholders by default as well.

    That said I am still having issue getting the file to write. I added a section and added a CSS option type to that, paste the following

    #header{
    {{header_bg}}
    	}

    dynamic.css is present at the root folder with CHMOD 777.
    Tested write permissions using a php script and it works fine.

    Plugin Author Derek Herman

    (@valendesigns)

    You create as many CSS option types as you like. Each one will insert into the dynamic.css file for you with comments about which option is being generated above the CSS. So for example, when you create your CSS option and give it an ID of header_css and paste the following code into it:

    #header {
        {{header_bg}}
    }

    you would get the following inside the dynamic.css file:

    /* BEGIN header_css */
    #header {
        DYNAMIC CSS WOULD BE INSERTED HERE!
    }
    /* END header_css */

    I also wasn’t clear on where to put the actual CSS.
    I was pasting it into the dynamic.css file itself as well.

    After reading the docs again it is actually pretty clear

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: OptionTree] dynamic.css file problem or background issue’ is closed to new replies.