Title: Error in result-count.php
Last modified: May 28, 2026

---

# Error in result-count.php

 *  Resolved [projectdeeds](https://wordpress.org/support/users/projectdeeds/)
 * (@projectdeeds)
 * [18 hours, 3 minutes ago](https://wordpress.org/support/topic/error-in-result-count-php/)
 * This theme wasn’t updated for the latest version of WooCommerce that came out
   recently. I was getting an error in result-count.php. WooCommerce changed the
   way that it passes certain values. I used the following code to fix the issue.
 *     ```wp-block-code
       <?php/** * Result Count * * Updated for WooCommerce 7.8+. */if ( ! defined( 'ABSPATH' ) ) {    exit;}// WooCommerce now passes values inside $args.$total    = isset( $args['total'] ) ? (int) $args['total'] : 0;$per_page = isset( $args['per_page'] ) ? (int) $args['per_page'] : 0;$current  = isset( $args['current'] ) ? (int) $args['current'] : 1;?><div class="woocommerce-result-count-wrapper woostify-result-count-wrapper" itemscope itemtype="https://schema.org/ItemList">    <meta itemprop="numberOfItems" content="<?php echo esc_attr( $total ); ?>" />    <meta itemprop="itemListOrder" content="https://schema.org/ItemListOrderAscending" />    <p class="woocommerce-result-count woostify-result-count text-sm md:text-base" aria-live="polite">        <?php        // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped        if ( 1 === $total ) {            _e( 'Showing the single result', 'woostify' );        } elseif ( $total <= $per_page || -1 === $per_page ) {            printf(                _n(                    'Showing all %d result',                    'Showing all %d results',                    $total,                    'woostify'                ),                $total            );        } else {            $first = ( $per_page * $current ) - $per_page + 1;            $last  = min( $total, $per_page * $current );            printf(                _nx(                    'Showing <span class="result-first" itemprop="startIndex">%1$d</span>&ndash;<span class="result-end" itemprop="endIndex">%2$d</span> of <span class="result-total" itemprop="numberOfItems">%3$d</span> result',                    'Showing <span class="result-first" itemprop="startIndex">%1$d</span>&ndash;<span class="result-end" itemprop="endIndex">%2$d</span> of <span class="result-total" itemprop="numberOfItems">%3$d</span> results',                    $total,                    'with first and last result',                    'woostify'                ),                $first,                $last,                $total            );        }        // phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped        ?>    </p></div>
       ```
   

Viewing 1 replies (of 1 total)

 *  Theme Author [dylan ngo](https://wordpress.org/support/users/duongancol/)
 * (@duongancol)
 * [1 hour, 19 minutes ago](https://wordpress.org/support/topic/error-in-result-count-php/#post-18922568)
 * Hi,
 * A new version that fixed this issue has been released.
 * Please update the theme to apply the fix!
   Cheers!

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-in-result-count-php%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/woostify/2.5.2/screenshot.png)
 * Woostify
 * [Support Threads](https://wordpress.org/support/theme/woostify/)
 * [Active Topics](https://wordpress.org/support/theme/woostify/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/woostify/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/woostify/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [dylan ngo](https://wordpress.org/support/users/duongancol/)
 * Last activity: [1 hour, 19 minutes ago](https://wordpress.org/support/topic/error-in-result-count-php/#post-18922568)
 * Status: resolved