Exclude stylesheet from admin

There are a couple of options. One is to wrap the enqueue in a check to see if it is the admin. if(!is_admin()) wp_enqueue_style(….); The other is wait to enqueue the style until template_redirect. function my_enqueue_styles() { wp_enqueue_style(….); } add_action( ‘template_redirect’, ‘my_enqueue_styles’ );

Adding WordPress colorpicker in widget settings

The following worked for me. I using class attribute instead of ID to match multiple color pickers. <script type=”text/javascript”> jQuery(document).ready(function($) { jQuery(‘.color-picker’).on(‘focus’, function(){ var parent = jQuery(this).parent(); jQuery(this).wpColorPicker() parent.find(‘.wp-color-result’).click(); }); }); </script> My Widget form is set up like : <p> <label for=”<?php echo $this->get_field_id( ‘font_color’ ); ?>” style=”display:block;”><?php _e( ‘Font Color:’ ); ?></label> <input … Read more

Adding goodies to themes

There are three ways to do this Functions.php Put your additions in functions.php and back up that file before you update your theme. Then you can port over any additions as necessary. Child theme Build a child theme that adds the functionality – in reality, this would be an even better way to use a … Read more

Theme of codinghorror.com

Actually i’m pretty sure it’s Movable Type. And honestly, it’s about as simple a theme as you could find. If I were you, I’d start with the Thematic framework and add a tiny bit of CSS. Shouldn’t need much more than that!