WordPress.org

Support

Support » Plugins and Hacks » Using if statement in dynamic stylesheet?

Using if statement in dynamic stylesheet?

  • I want to give the option of either having a fixed header or not..

    #header {
    	<?php if ( moon_get_option('example_checkbox') ) { ?>
        position: <?php echo moon_get_option('example_checkbox', 'fixed' ); ?>;
        width: 100%;
        z-index: 1;
    	<?php } ?>
    }

    I am slowly learning php, and I know that I can say if example_checkbox is set to true then echo the text “fixed”, I am pretty sure that’s the best way to do it, but I don’t know how to say that in php yet, so if you have any idea I would really appreciate it.

    This would be very powerful and could really help my theme development if I could get some insight on using if statements with dynamic CSS..

    I searched for an answer for this and couldn’t find much.

    http://wordpress.org/extend/plugins/options-framework/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Using if statement in dynamic stylesheet?’ is closed to new replies.