Dequeue Scripts and Style for Mobile not working?

You should run the conditional tags (e.g. is_front_page()) from inside the callback/function (e.g. remove_default_stylesheet()) — see Where to Use Conditional Tags and the warning here. And there’s no hook named wp_enqueue_style; just use the wp_enqueue_scripts to enqueue/register/dequeue/deregister a stylesheet file. So I’m not sure the exact conditionals you need, but the following would dequeue/deregister the … Read more

Formatting ?

You either need to add such code via the HTML editor (and not switch back to the Visual editor), or else you will need to pass a custom configuration to the Visual editor. I have similar needs, and here’s what I use (in functions.php): // http://tinymce.moxiecode.com/wiki.php/Configuration function cbnet_tinymce_config( $init ) { // Change code cleanup/content … Read more

How to Change CSS Variable value in Theme Customizer Live Preview

Quick Note: It looks like you may want to use a Color Control instead of excluding type and getting the default text control. For example, this will turn your text input into a color picker… $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, ‘primary_color’, [ ‘label’ => __( ‘Primary Color’, ‘mytheme’ ), ‘section’ => ‘mytheme_color_options’, ‘type’ => ‘color’ ] … Read more

add_theme_support( ‘custom-header’ ) does not add option menu in dashboard

From Codex: If attached to a hook, it must be after_setup_theme. The init hook may be too late for some features. Try this if ( ! function_exists( ‘mytheme_setup’ ) ): function mytheme_setup() { add_theme_support( ‘custom-header’ ); } endif; add_action( ‘after_setup_theme’, ‘mytheme_setup’ ); If you use Toolbox Theme, find in functions.php function toolbox_setup() { and add … Read more

Why isn’t my if/elseif/else working correctly here?

is_category will not process the logic inside the argument list. This: is_category(‘glorkian’ || ‘glork’) The condition is true on all category pages. What I think is happening is that PHP does parse that argument string, but is always going to be true. Try this: var_dump(‘glorkian’ || ‘glork’); Meaning that what you are doing, essentially, is … Read more