Hi @gohelkunjan!
By default, in WooCommerce, on the search results page, the product SKU is not displayed on the product tile. Here is a code snippet that will add this code under the product title.
// Add SKU to the product tile on the products archive and search results page
add_action( 'woocommerce_after_shop_loop_item_title', function () {
global $product;
if ( $product && $product->get_sku() ) {
echo '<span class="product-sku">' . esc_html__( 'SKU: ', 'woocommerce' ) . $product->get_sku() . '</span>';
}
}, 10 );
You have two ways to add this code to your theme:
- Open the
functions.php
in your child theme and add the code at the end.
- or install the?Code Snippets?plugin and apply this code as a snippet.
Regards,
Kris