Is it possible to get a theme customizer setting from wp.customize using jquery?

Not sure what you try to accomplish, but you can get a value by key using the wp.customize object: wp.customize.value(‘show_on_front’)(); wp.customize.value(‘blogname’)(); …. sorry no jQuery here, just javascript, and yes, the extra () are intentional. Edit: Full overview of all settings: wp.customize._value; console.log(wp.customize._value); Edit II: different approach: a) lookup all available settings by using console.log(wp.customize._value); … Read more

Create WooCommerce Product Category Programmatically

To create a taxonomy term programmatically you can use wp_insert_term function. <?php wp_insert_term( $term, $taxonomy, $args = array() ); ?> It has 3 params: $term (int|string) (required) The term to add or update. Default: None $taxonomy (string) (required) The taxonomy to which to add the term. Default: None $args (array|string) (optional) Change the values of … Read more

Add colors to existing color palette without replacing it

You can merge palettes $existing = get_theme_support( ‘editor-color-palette’ ); $new = array_merge( $existing[0], array( array( ‘name’ => __( ‘Strong magenta’, ‘themeLangDomain’ ), ‘slug’ => ‘strong-magenta’, ‘color’ => ‘#a156b4’, ), array( ‘name’ => __( ‘Light grayish magenta’, ‘themeLangDomain’ ), ‘slug’ => ‘light-grayish-magenta’, ‘color’ => ‘#d0a5db’, ), )); add_theme_support( ‘editor-color-palette’, $new);

How to alter the text of the post “Excerpt” box label in WordPress post editor?

there is a filter hook you can use and it is gettext here: add_filter( ‘gettext’, ‘wpse22764_gettext’, 10, 2 ); function wpse22764_gettext( $translation, $original ) { if ( ‘Excerpt’ == $original ) { return ‘My Excerpt label’; }else{ $pos = strpos($original, ‘Excerpts are optional hand-crafted summaries of your’); if ($pos !== false) { return ‘My Excerpt … Read more