Page Description not visible

  • Unknown's avatar

    Hello everyone,
    My problem is with the page description in shop page(s).
    If you check the link of the first shopping page
    All Products
    you will see, there are few categories listed in them. (All / Abstract Drawing / Abstract Painting / Mandala / Botanical and Floral Series)
    Unfortunately they are only visible on the first page. Rest of the pages just displays the title of the page / tag. (Shop All Products)
    This happens in every other pages with different filters too.

    I will truly appreciate if you can help me out with this glitch. I have tired so many times to rectify this problem but cannot find the solution. Please help!!

    Note – the shop is in wordpress.com with woocommerce / storefront theme.

    Thank you for your time – neena

    The blog I need help with is: (visible only to logged in users)

  • Hi neena! This is interesting. Are you using a plugin to generate those links? It looks like normally this part of the page would show a description of the archive page, but that wouldn’t necessarily carrying into pages 2, 3, etc. I believe that would take some custom coding to change that, or some sort of plugin.

    A menu would carry over, though, so if it would make sense for your site, you might consider adding your category links to the top menu.

    Also, did you know you have direct support available here?
    https://wordpress.com/help/contact

  • Also, I spoke with some folks at WooCommerce, and while this type of code customization is outside the scope of what they can offer, if you’re comfortable developing or are willing to hire a developer, this gist may help point you in the right direction for adding this on all paginated archives:


    <?php
    // the `woocommerce_taxonomy_archive_description` and the `woocommerce_product_archive_description` functions do not display the category's description on pagination
    // this code removes them from WooCommerce and rewrites them to show the description also on new pages
    // Before: page 1 (https://d.pr/i/E2iHoD) & page 2 (https://d.pr/i/RiiCOy)
    // After: page 1 (https://d.pr/i/E2iHoD) & page 2 (https://d.pr/i/DyGEVQ)
    remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
    remove_action( 'woocommerce_archive_description', 'woocommerce_product_archive_description', 10 );
    add_action( 'woocommerce_archive_description', function () {
    if ( is_product_taxonomy() ) {
    $term = get_queried_object();
    if ( $term && ! empty( $term->description ) ) {
    // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    echo '<div class="term-description">' . wc_format_content( $term->description ) . '</div>';
    }
    }
    } );
    add_action( 'woocommerce_archive_description', function () {
    // Don't display the description on search results page.
    if ( is_search() ) {
    return;
    }
    if ( is_post_type_archive( 'product' ) ) {
    $shop_page = get_post( wc_get_page_id( 'shop' ) );
    if ( $shop_page ) {
    $description = wc_format_content( $shop_page->post_content );
    if ( $description ) {
    // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    echo '<div class="page-description">' . $description . '</div>';
    }
    }
    }
    } );

    view raw

    functions.php

    hosted with ❤ by GitHub

  • Unknown's avatar
  • Also, remember that with your plan, you can access Live Chat directly via https://wordpress.com/help/contact. That way, you can get help faster :).

  • The topic ‘Page Description not visible’ is closed to new replies.