This topic has 2 replies, 2 voices, and was last updated 6 years, 6 months ago ago by Olga Barlow
Hey,
I noticed that while there is pagination in woocommerce category the description below category is not hiding on supages (ie: category_name/page/2/ had bottom desc).
Can you help me because it ruins SEO.
Hello,
Install and activate child theme if you did not do it before and add the following code in functions.php of the child theme:
function etheme_second_cat_desc() {
global $wp_query;
$cat = $wp_query->get_queried_object();
if ( 0 !== absint( get_query_var( 'paged' ) ) ) return;
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;
}
Regards
You must be logged in to reply to this topic.Log in/Sign up