{"id":7120238,"date":"2016-02-29T12:56:59","date_gmt":"2016-02-29T12:56:59","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/code-in-functionphp-child-theme-not-executed\/"},"modified":"2016-08-31T14:04:19","modified_gmt":"2016-08-31T14:04:19","slug":"code-in-functionphp-child-theme-not-executed","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/code-in-functionphp-child-theme-not-executed\/","title":{"rendered":"Code in function.php child theme not executed."},"content":{"rendered":"<p>Hi,<\/p>\n<p>I have put some code in a child theme I created because my client wants me to hide the following on his website:<br \/>\nSKU on product page;<br \/>\nProduct title;<br \/>\nAdditional information tab;<br \/>\nReview tab;<\/p>\n<p>So, in order to achieve this I put the following code in the child themes function.php:<\/p>\n<pre><code>&lt;?php\nadd_filter( &#039;woocommerce_product_tabs&#039;, &#039;woo_remove_product_tabs&#039;, 98 );\n\nfunction woo_remove_product_tabs( $tabs ) {\n\n    unset( $tabs[&#039;reviews&#039;] );\n    unset( $tabs[&#039;additional_information&#039;] );\n\n    return $tabs;\n\n}\n\n   \/\/ Remove Product title\n\nadd_filter( &#039;woocommerce_product_description_heading&#039;, &#039;remove_product_description_heading&#039; );\nfunction remove_product_description_heading() {\nreturn &#039;&#039;;\n}\n\n  \/\/ remove SKU on product page\n\nfunction sv_remove_product_page_skus( $enabled ) {\n    if ( ! is_admin() &amp;&amp; is_product() ) {\n        return false;\n    }\n\n    return $enabled;\n}\nadd_filter( &#039;wc_product_sku_enabled&#039;, &#039;sv_remove_product_page_skus&#039; );<\/code><\/pre>\n<p>But the information stil shows in the frontend. When I put the same code in the function.php of the parent theme, it is executed properly.<\/p>\n<p>What am I missing and how do I get it to work.<\/p>\n<p>Thank you in advance.<\/p>\n","protected":false},"template":"","class_list":["post-7120238","topic","type-topic","status-publish","hentry","topic-tag-child-theme","topic-tag-function-php"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7120238","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\/7120238\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7120238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}