New Landing How can we help? Themeforest Theme Support Dante Displaying the SKU on the Woocommerce Shop Archive page.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #328946
    A
    Member
    Post count: 2

    Hello Dante Support Theme!

    Thanks for the theme, it is awesome. Now just finalizing the last touches for us.
    I was wondering if it was possible to display the SKU on the shop archive page.

    Kind of like this, but for the Dante theme:

    Thanks in advance,
    Joshua

    #329065
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Joshua,

    Not possible as standard, but you could try this code:

    function shop_display_skus() {
    
    	global $product;
    	
    	if ( $product->get_sku() ) {
    		echo '<div class="product-meta">SKU: ' . $product->get_sku() . '</div>';
    	}
    }
    add_action( 'woocommerce_after_shop_loop_item_title', 'shop_display_skus', 9 );

    – Ed

    #329483
    A
    Member
    Post count: 2

    Thank you so much!!
    That did it. Added some CSS and its all good now.

    #329484
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Glad it’s sorted. thanks Ed.

    -Rui

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

You must be logged in to reply to this topic.