Add a label on shop page results

[ad_1]

Hi, I’ve added a custom php snippet in my themes functions.php to show the SKU number on the products display on the shop page. This works but I’d like to add the text ‘Parts Number’ before the SKU number. I’m not too clever with php coding, this is a snippet I found by searching. Can anyone please help? Many thanks

add_action( 'woocommerce_after_shop_loop_item_title',  'custom_after_title' );
function custom_after_title() {

global $product;

if ( $product->get_sku() ) {
    echo $product->get_sku();
}

}

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer