Home Forums WoodMart support forum Product grid Title after SKU Number show

Product grid Title after SKU Number show

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #372514

    CyberDome
    Participant

    Shop page product title after sku Number show code provide.

    Attachments:
    You must be logged in to view attached files.
    #372523

    Luke Nielsen
    Keymaster

    Hello,

    In order to show the SKU after the title, please, try to add this code to the functions.php file in your child theme.

    if ( ! function_exists('wd_sku_under_title_on_loop') ) {
        function wd_sku_under_title_on_loop()  {
            global $product;
            $sku = $product->get_sku();
    
            if ( $sku ) {
                echo '<span class="product-grid-sku"><span>SKU: </span>' . $sku . '</span>';
    
            }
        }
    
        add_action( 'woocommerce_shop_loop_item_title', 'wd_sku_under_title_on_loop', 15 );
    }

    If there’s anything else we can do, please get in touch.

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)