functions.php in child not working
-
Hello,
I’ve created a child theme for shophistic-lite.
the child css is working however I created an empty functions.php and pasted this in as I want to add an additional information tab in my case called “Lorem ipsum”:<?php /*My custom functions*/ add_filter( 'woocommerce_product_tabs', 'woo_custom_description_tab', 98 ); function woo_custom_description_tab( $tabs ) { $tabs['description']['callback'] = 'woo_custom_description_tab_content'; // Custom description callback return $tabs; } function woo_custom_description_tab_content() { echo '<h2>Art Specifications</h2>'; echo '<p><strong>Lorem ipsum here</strong></p> <p>Lorem ipsum here</p>'; } add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); function woo_rename_tabs( $tabs ) { $tabs['description']['title'] = __( 'More Information' ); // Rename the description tab // $tabs['reviews']['title'] = __( 'Ratings' ); // Rename the reviews tab // $tabs['additional_information']['title'] = __( 'Product Data' ); // Rename the additional information tab return $tabs; ?>
This code works if placed into the parent functions.php but not when I add it to the child functions.php.
This would be lost when updating the parent theme so I need it in the child. Any help greatly appreciated. I’ve read the codex on creating child functions.php and I don’t know what I’m missing here????
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘functions.php in child not working’ is closed to new replies.