Static block doesn’t show up on the second products page

This topic has 5 replies, 3 voices, and was last updated 2 years, 6 months ago ago by saltasdusas

  • Avatar: saltasdusas
    saltasdusas
    Participant
    October 19, 2021 at 09:19

    Hello, I need little help 🙂
    Static block doesn’t show up on the second products page.
    Everything works fine on the first page of the products, but when I press Next page and it loads up, then there is only products without static block.

    What I need to do to show the same static block on the other product categories pages?

    Pictures:
    1. First page of products. https://kingo.lt/produkto-kategorija/interjero-detales/vazos/
    https://prnt.sc/1wpcdps
    2. Second page of products. https://kingo.lt/produkto-kategorija/interjero-detales/vazos/page/2/
    https://prnt.sc/1wpcek7

    4 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 19, 2021 at 12:10

    Hello,

    WooCommerce doesn’t allow the display of category description on pages with paginations. Set next settings in Theme Options – https://prnt.sc/1skj76w https://prnt.sc/1skkpf9

    Regards

    Avatar: saltasdusas
    saltasdusas
    Participant
    October 19, 2021 at 16:12

    Thanks for quick reply.

    I have changed the settings in Theme options as You said, but it’s the same.

    I can see static block on the main page of products(https://kingo.lt/produkto-kategorija/interjero-detales/vazos/), but cannot see static block on second page(https://kingo.lt/produkto-kategorija/interjero-detales/vazos/page/2/).

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    October 20, 2021 at 15:02

    Hello,

    It’s related to the WooCommerce plugin itself. It does not display category or shop page description for the pages. I changed the default WooCommerce function to display that and added the below code to child theme functions.php

    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
    		}
    	}
    }

    Regards

    Avatar: saltasdusas
    saltasdusas
    Participant
    October 20, 2021 at 17:20

    Hello 🙂

    Amazing! I really appreciate Your support 🙂

    Thanks!

  • Viewing 5 results - 1 through 5 (of 5 total)

The issue related to '‘Static block doesn’t show up on the second products page’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.