Support » Plugin: OptionTree » [Plugin: OptionTree] Background Option

  • When I use <?php echo(ot_get_option('custom_background_css|background_color')) ?> it returns nothing but when I use <?php echo(ot_get_option('custom_background_css')) ?> it returns all the values set through the options page but it returns them all with commas. I need to be able to call it without commas or individually. Can anyone help me?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I meant <?php echo(ot_get_option('custom_background_css|background-color')) ?> I tried both just to make sure. Thanks in advance!

    Hey Eric W.

    I don’t think you have to call the option in the php file.
    You set up a custom background option on the options page, and along with it, you have to set up a css option and add the css code to the css box that was created when you created a css option.

    You also have to create a file called dynamic.css, (call this file from your header.php) so that whatever you write in the css box, will show up on that file dynamically, and that will help you set up your background.

    In the css box in your theme options you would have the following:

    where home_content is the id name of the background option I(you) set up.

    Hello Vabmedia! Thank you for your response. I guess I am missing something. Tyring to follow your instructions and documentation as well. I have created dynamic.sss and placed this code inside `.all-container {

    }` custom_background is the option. I called the stylesheet from header.php I also changed permissions on that file to 777. What am I missing?

    Right now I use a dynamic.php that has worked great. Thats why I was trying to call them through php. Here is an example of how I thought it should look. `

    <?php { ?>
    <style type=”text/css”>
    .all-container {

    background: <?php echo(ot_get_option(‘custom_background’)) ?>;

    <?php } ?>

    That however, doesn’t work.

    Any and all help would be greatly appreciated. Thank you!


    last message i meant to say dynamic.css

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: OptionTree] Background Option’ is closed to new replies.