Reply 171692 to: Problems after upgrading x-store theme -Fatal error: call to undefined function

Avatar: laranz
Laranz
Participant
September 6, 2017 at 06:01

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.

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.