Send data from Customizer Settings to Customizer Preview with settingless control
Send data from Customizer Settings to Customizer Preview with settingless control
Send data from Customizer Settings to Customizer Preview with settingless control
Theme Customizer – My panel disappears
WordPress Customizer Control with React
You should register the default headers using register_defaults_headers – e.g. register_default_headers( array( ‘default-image’ => array( ‘url’ => get_stylesheet_directory_uri() . ‘/assets/img/default-header.jpg’, ‘thumbnail_url’ => get_stylesheet_directory_uri() . ‘/assets/img/default-header.jpg’, ‘description’ => __( ‘Default Header Image’, ‘textdomain’ ) ), ) ); See the codex entry for more info on the function – https://codex.wordpress.org/Function_Reference/register_default_headers. The Codex isn’t clear, but this function … Read more
Because an email isn’t a URL; you need to prepend the protocol to the value you pass to esc_url: <a href=”https://wordpress.stackexchange.com/questions/227925/<?php echo esc_url(“mailto:’ . get_theme_mod( ‘header_utility_right_email_block_link’ ) ) ?>” …
I needed to tweak the settings and controls code a bit to get them to work: $wp_customize->add_panel(‘mypanel’, array( ‘title’ => __(‘My awesome panel’, ‘domain’), ‘description’ => __(“This is the description which doesn’t want to show up :(“, ‘domain’), ‘capability’ => ‘edit_theme_options’, ‘priority’ => 2 )); $wp_customize->add_section(‘mysection’, array( ‘title’ => __(‘My even more awesome section’, ‘domain’), … Read more
The reference to a post needs the item symbol within double curly braces: add_action(‘after_setup_theme’, function () { add_theme_support( ‘starter-content’, array( ‘posts’ => array( ‘home’ => array( // Use a page template with the predefined about page ‘template’ => ‘template-frontpage.php’, ), ), ‘options’ => array( ‘show_on_front’ => ‘page’, ‘page_on_front’ => ‘{{home}}’, ), )); }); And remember: … Read more
I think the simpler solution would be to create your own function: function get_theme_mod_img($mod_name){ return str_replace(array(‘http:’, ‘https:’), ”, get_theme_mod($mod_name)); } then just use it: <a href=”https://wordpress.stackexchange.com/questions/256864/<?php echo esc_url(get_theme_mod(“slide_one_link’)); ?>”><img src=”<?php echo esc_url( get_theme_mod_img( ‘slide_img_upload_one’ ) ); ?>” alt=”<?php echo get_theme_mod( ‘slide_title_1’ ); ?>” /></a> there is another solution that involve filters as you can see … Read more
as far as I know there is no WordPress Standard Control in the Theme Customizer for a Color Picker. But you can add one with a new Class. Paul underwood made a wonderful tutorial for adding Custom Controls here! And gave examples containing a color picker on github. (NOTE: Please note of the important below … Read more
You can change active status of section using customize_section_active filter. It gives 2 parameters $active–bool and $section–object. Haven’t tried it so you can try and see if works for you. Located in \wp-includes\class-wp-customize-section.php, for your research. As second option you can try altering capability for the section. Note: I’m just giving options, and have not … Read more