Background Color not being set in WP Customizer

Also I modified two things One: $wp_customize->add_setting( // $id ‘header_background_color’, // $args array( ‘default’ => ”, ‘type’ => ‘theme_mod’, ‘capability’ => ‘edit_theme_options’, ‘sanitize_callback’ => ‘sanitize_hex_color’, ‘transport’ => ‘postMessage’ ) ); Two: $wp_customize->add_control( new WP_Customize_Color_Control( // $wp_customize object $wp_customize, // $id ‘header_background_color’, // $args array( ‘settings’ => ‘header_background_color’, ‘section’ => ‘sk_section_header’, ‘label’ => __( ‘Header Background … Read more

How to add new theme to running website

If I got you correctly, WP Theme Test is such a plugin that can assist you. In my case I take the whole live site in localhost, by copying the whole WordPress installation and its database, and then test any new theme on it (or any modification to existing theme). If the local test passed, … Read more

wp_customize – detect post type to show/hide customizer options

Customizer Controls can be displayed based on context. With active_callback API introduced in WordPres 4.0, you can control where to show your specific options. Add your customizer options like this with the optional active_callback argument. $wp_customize->add_control( ‘wc_cart_page_option’, array( ‘label’ => esc_html__( ‘Cart Page Options’ ), ‘section’ => ‘wc_cart’, ‘active_callback’ => ‘estore_is_cart’, )); Now create a … Read more

How to filter customize_loaded_components from a theme?

Since WordPress 4.5, there is a new warning regarding the use of remove_panel with core components (at the moment ‘nav_menus’ and ‘widgets’). The warning states: Removing WP_Customize_Manager::remove_panel manually will cause PHP warnings. Use the customize_loaded_components filter instead. Apparently it was added because of some php and javascript errors that seemed to be occurring in WordPress … Read more

How to output widget

Check this out, it may guide you in the direction you need: First: register_sidebar( array( ‘name’ => ‘Social Media button’, ‘id’ => ‘smb’, ‘before_widget’ => ‘<li>’, ‘after_widget’ => ‘</li>’, ) ); Second code: public function widget( $args, $instance ) { $output = $args[‘before_widget’]; $output .= ‘<a href=”‘ . $instance[‘url’] . ‘” class=”fa fa-‘ . $args[‘icon_title’] … Read more

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