This topic has 10 replies, 3 voices, and was last updated 7 years, 2 months ago ago by Rose Tyler
Fatal error: Uncaught Error: Call to undefined function etheme_second_cat_desc() in /home/danegtved/public_html/wp-content/themes/xstore/woocommerce/archive-product.php:95 Stack trace: #0 /home/danegtved/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(205): include() #1 /home/danegtved/public_html/wp-content/plugins/woocommerce/templates/taxonomy-product_cat.php(22): wc_get_template(‘archive-product…’) #2 /home/danegtved/public_html/wp-includes/template-loader.php(74): include(‘/home/danegtved…’) #3 /home/danegtved/public_html/wp-blog-header.php(19): require_once(‘/home/danegtved…’) #4 /home/danegtved/public_html/index.php(17): require(‘/home/danegtved…’) #5 {main} thrown in /home/danegtved/public_html/wp-content/themes/xstore/woocommerce/archive-product.php on line 95
Hello,
Do you use child theme? Please try to activate parent theme. Let me know result.
Regards
Yes we are using child theme. Parent theme works
In this case, you need to check the child theme code to find out what caused the issue.
Regards
OK. my customer is not using a second description in the category loop, so this new function is now disabled in the child theme.
So is your problem solved?
Regards
in this case, but You should look into why the function etheme_second_cat_desc() need to be defined in the child theme. The general idea of a child theme is to add or supplement functions. Not reproducing them from the parent theme
Hi,
The function “etheme_second_cat_desc” is already described in the parent theme, so if you re-declare that in the Child theme, then you can edit the function according to your needs. To override copy the function from parent theme and past that to child theme, and do the things you want to do.
function etheme_second_cat_desc() {
global $wp_query;
$cat = $wp_query->get_queried_object();
if( property_exists( $cat, 'term_id' ) && ! is_search() ){
$desc = get_term_meta( $cat->term_id, '_et_second_description', true );
} else {
return;
}
if ( ! empty( $desc ) ) {
echo '<div class="term-description et_second-description">' . do_shortcode( $desc ) . '</div>';
}
return;
}
Let us know,
Thanks,
laranz.
Thank you.
No problem as long as you keep it that way in future upgrades…
You’re welcome!
Regards
Tagged: best selling, fatal error, themes, upgrading, woocommerce, x-store
You must be logged in to reply to this topic.Log in/Sign up