Child theme function.php widget problem
-
I am using a child theme with customizr. I am using the enqueue method in function.php. There does not seem to be anything wrong with my child themes style.css file. It cheks out with no errors in a Lint validator. If i switch back to the customizr theme and put the childs themes style.css contents in the advanced css box everything works fine. When i go back to my child theme, all the style changes are fine but the widgets are in the wrong place. The left side bar widget goes to the top and the right side widget goes to the bottom. I have even tried two different function.php files that i found and bot behvae the same.
<?php
function themeslug_enqueue_style() {
if ( is_child_theme() ) {
// load parent stylesheet first if this is a child theme
wp_enqueue_style( ‘parent-stylesheet’, trailingslashit( get_template_directory_uri() ) . ‘style.css’, false );
}
// load active theme stylesheet in both cases
wp_enqueue_style( ‘theme-stylesheet’, get_stylesheet_uri(), false );
}add_action( ‘wp_enqueue_scripts’, ‘themeslug_enqueue_style’ );
?>and another one
<?php
remove_action(‘wp_print_styles’, ‘cc_tabby_css’, 30);function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );}
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );?>
I am amazed at how different they both are but they both execute the style changes properly but both move the widgets. Can anybody help.
ThanksThe page I need help with: [log in to see the link]
- The topic ‘Child theme function.php widget problem’ is closed to new replies.