Add button to Customizer

There are three things you need to do in particular. As there are no settings associated with the control, you need to explicitly supply an empty array for settings, as otherwise it will try to look for a setting ID that matches the control ID (here button_id); since that setting never gets created, the control … Read more

How to remove menus section from WordPress theme customizer

Try nav_menus instead of menus with remove_panel() function mytheme_customize_register( $wp_customize ) { //All our sections, settings, and controls will be added here $wp_customize->remove_section( ‘title_tagline’); $wp_customize->remove_section( ‘colors’); $wp_customize->remove_section( ‘header_image’); $wp_customize->remove_section( ‘background_image’); $wp_customize->remove_panel( ‘nav_menus’); $wp_customize->remove_section( ‘static_front_page’); $wp_customize->remove_section( ‘custom_css’); } add_action( ‘customize_register’, ‘mytheme_customize_register’,50 ); Hope this will helps you. Thank you!

Redirect after closing Theme Customizer when user does not have permission for theme page

You can try this jQuery script injected via the customize_controls_print_footer_scripts hook: /** * Change the url of the Close link in the /wp-admin/customize.php page * See http://wordpress.stackexchange.com/q/116257 */ function change_close_url_wpse_116257() { $url = get_admin_url(); // Edit this to your needs printf( “<script> jQuery(document).ready( function(){ jQuery(‘#customize-header-actions a.back.button’).attr(‘href’, ‘%s’); }); </script>” , esc_js( $url ) ); } … 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

How do I use add_control to offer a list of all pages in the customiser?

To add a Customiser control for selecting a page from a dropdown you just need to set the type argument to dropdown-pages: $wp_customize->add_control( array( ‘type’ => ‘dropdown-pages’, ‘section’ => ‘my_custom_section’, ‘label’ => __( ‘Pick a page, bub’ ), ) ); This will give you a control that’s a <select> dropdown with a list of pages … Read more

How to change in customizer the “site identity” tab required capabilities

This is how I’ve interpreted from the wordpress docs at least. Originally these settings were made with add_setting and it is where the capability was originally set. Fortunately, we can use get_setting to change that value. It seems to work very well for your case. function wpseo_206907_add_back_customizer_controls_for_not_admins( $wp_customize ) { $wp_customize->get_setting( ‘blogname’ )->capability = ‘edit_theme_options’; … Read more

How can you change default color scheme in a Twenty Fifteen child theme?

I would expect that if you add a new filter with a higher priority it gets added to the existing color schemes: add_filter( ‘twentyfifteen_color_schemes’, ‘wpse193782_custom_color_schemes’, 99 ); function wpse193782_custom_color_schemes( $schemes ) { $schemes[‘default’] = array( ‘label’ => __( ‘Colors by Kat’, ‘twentyfifteen’ ), ‘colors’ => array( ‘#f1f1f1’, ‘#C32148’, ‘#ffffff’, ‘#333333’, ‘#333333’, ‘#f7f7f7’, ), ); return … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)