Home Forums WoodMart support forum The description of the category remove when advancing to the next page

The description of the category remove when advancing to the next page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #387419

    Upper Estudios
    Participant

    I have a description written on the page of each category, but it only appears on the first page of the category. When I continue to pages 2, 3, 4… the description disappears. How can I solve that?

    #387449

    Luke Nielsen
    Keymaster

    Hello,

    Thank you for reaching out to us!

    Sorry, but it’s the default functionality of WooCommerce so we cannot influent it and on other pages it disappears because it needs for the SEO optimization.

    I sincerely appreciate your understanding in this matter. Please feel free to reach out to me if you have any further questions.

    Kind Regards

    • This reply was modified 2 years, 5 months ago by Luke Nielsen.
    #387489

    Upper Estudios
    Participant

    Thanks for your quick response.
    I have other online stores with woocommerce and this problem does not happen. When I turn the page the description is still there, I think it’s because of some hook of the theme and not of woocommerce, could you check it again?
    Thanks again.
    Best regards.

    #387720

    Luke Nielsen
    Keymaster

    Hello,

    The below code will help you to show the category description on each category page. Please, paste it to the functions.php file in your child theme.

    if ( ! function_exists( 'woocommerce_taxonomy_archive_description' ) ) {
    
    	/**
    	 * Show an archive description on taxonomy archives.
    	 */
    	function woocommerce_taxonomy_archive_description() {
    		if ( is_product_taxonomy() ) {
    			$term = get_queried_object();
    
    			if ( $term && ! empty( $term->description ) ) {
    				echo '<div class="term-description">' . wc_format_content( wp_kses_post( $term->description ) ) . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    			}
    		}
    	}
    }

    If you would like to discuss the issue further, our customer support team is here for you.

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)