{"id":10010466,"date":"2018-02-24T14:02:21","date_gmt":"2018-02-24T14:02:21","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/child-theme-function-php-widget-problem\/"},"modified":"2018-02-24T14:02:21","modified_gmt":"2018-02-24T14:02:21","slug":"child-theme-function-php-widget-problem","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/child-theme-function-php-widget-problem\/","title":{"rendered":"Child theme function.php widget problem"},"content":{"rendered":"<p>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.<\/p>\n<p>&lt;?php<br \/>\nfunction themeslug_enqueue_style() {<br \/>\n  if ( is_child_theme() ) {<br \/>\n    \/\/ load parent stylesheet first if this is a child theme<br \/>\n    wp_enqueue_style( &#8216;parent-stylesheet&#8217;, trailingslashit( get_template_directory_uri() ) . &#8216;style.css&#8217;, false );<br \/>\n    }<br \/>\n    \/\/ load active theme stylesheet in both cases<br \/>\n    wp_enqueue_style( &#8216;theme-stylesheet&#8217;, get_stylesheet_uri(), false );<br \/>\n}<\/p>\n<p>add_action( &#8216;wp_enqueue_scripts&#8217;, &#8216;themeslug_enqueue_style&#8217; );<br \/>\n?&gt; <\/p>\n<p><em> <strong>and another one<\/strong><\/em><\/p>\n<p>&lt;?php<br \/>\nremove_action(&#8216;wp_print_styles&#8217;, &#8216;cc_tabby_css&#8217;, 30); <\/p>\n<p>function theme_enqueue_styles() {<br \/>\n\t\twp_enqueue_style( &#8216;parent-style&#8217;, get_template_directory_uri() . &#8216;\/style.css&#8217; );<\/p>\n<p>}<br \/>\nadd_action( &#8216;wp_enqueue_scripts&#8217;, &#8216;theme_enqueue_styles&#8217; );<\/p>\n<p>?&gt;<\/p>\n<p>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.<br \/>\nThanks<\/p>\n","protected":false},"template":"","class_list":["post-10010466","topic","type-topic","status-publish","hentry","topic-tag-child-theme","topic-tag-function-php","topic-tag-widget"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10010466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10010466\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=10010466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}