Archived topic
Sidebar widget padding not updating
3 replies · Started by Michael on July 25, 2020
In Customizer > Layout > Sidebars > Widget Padding, the padding for widgets will not update. The updated #'s save ok, but reload the site or Customizer and the padding is not correct (with new #'s showing).
Eg change padding to top: 10, right: 10, bottom: 10, left: 10. Previews shows change. Hit Publish. Reload site in other browser (no cache) with CTRL+F5, no update. Reload Customizer, shows updated #'s, but preview is not showing correct padding.
Same with Layout > Container > Content Padding.
No caching, and all other changes are working ok.
Hi there,
Are you using a child theme?
If so this is likely the issue:
https://docs.generatepress.com/article/child-theme-issues/#import
Nice, Leo - that was it :)
Child Theme Configurator is perhaps the most popular child theme creator so I'll just throw out there for the masses that it creates the following in the new child theme functions.php file:
// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED - Do not modify or remove comment markers above or below:
if ( !function_exists( 'chld_thm_cfg_locale_css' ) ):
function chld_thm_cfg_locale_css( $uri ){
if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . '/rtl.css' ) )
$uri = get_template_directory_uri() . '/rtl.css';
return $uri;
}
endif;
add_filter( 'locale_stylesheet_uri', 'chld_thm_cfg_locale_css' );
if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
function chld_thm_cfg_parent_css() {
wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'generate-style' ) );
}
endif;
//add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', 10 );
// END ENQUEUE PARENT ACTION
---
As shown in the doc linked to by Leo, disabling (//) 'wp_enqueue_scripts' did the trick... GP's Customizer works and the child theme is still in play.
Glad to hear :)