Title: Code in function.php child theme not executed.
Last modified: August 31, 2016

---

# Code in function.php child theme not executed.

 *  [Eddy Brock](https://wordpress.org/support/users/eddy-brock/)
 * (@eddy-brock)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/code-in-functionphp-child-theme-not-executed/)
 * Hi,
 * I have put some code in a child theme I created because my client wants me to
   hide the following on his website:
    SKU on product page; Product title; Additional
   information tab; Review tab;
 * So, in order to achieve this I put the following code in the child themes function.
   php:
 *     ```
       <?php
       add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
   
       function woo_remove_product_tabs( $tabs ) {
   
           unset( $tabs['reviews'] );
           unset( $tabs['additional_information'] );
   
           return $tabs;
   
       }
   
          // Remove Product title
   
       add_filter( 'woocommerce_product_description_heading', 'remove_product_description_heading' );
       function remove_product_description_heading() {
       return '';
       }
   
         // remove SKU on product page
   
       function sv_remove_product_page_skus( $enabled ) {
           if ( ! is_admin() && is_product() ) {
               return false;
           }
   
           return $enabled;
       }
       add_filter( 'wc_product_sku_enabled', 'sv_remove_product_page_skus' );
       ```
   
 * 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.
 * What am I missing and how do I get it to work.
 * Thank you in advance.

Viewing 1 replies (of 1 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/code-in-functionphp-child-theme-not-executed/#post-7120506)
 * > What am I missing
 * functions.php of the child theme gets executed before functions.php of the parent
   theme;
 * > and how do I get it to work.
 * add the filters into an action with `'after_setup_theme'` [https://codex.wordpress.org/Plugin_API/Action_Reference/after_setup_theme](https://codex.wordpress.org/Plugin_API/Action_Reference/after_setup_theme)

Viewing 1 replies (of 1 total)

The topic ‘Code in function.php child theme not executed.’ is closed to new replies.

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [function.php](https://wordpress.org/support/topic-tag/function-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/code-in-functionphp-child-theme-not-executed/#post-7120506)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
