-
humbleit
Hi Guys
I want to show SKU numbers on every single product page. Is there a way to do that?
https://nordicgear.dk/skaerm-a1466-macbook-air-13-2013-2017/
Thanks
Kasper -
Alvind
Hi there,
Could you specify where exactly you’d like the SKU to be displayed?
-
humbleit
Sure thing
Under the fan ‘Yderligere information’ under each product.
https://nordicgear.dk/brugt-skaerm-a1466-macbook-air-13-2013-2017
-
Hi there,
You could try a function like this:
add_filter( 'woocommerce_product_tabs', function( $tabs ) { add_action( 'woocommerce_product_additional_information', 'tu_display_sku_in_additional_information', 5 ); return $tabs; }, 98 ); function tu_display_sku_in_additional_information() { global $product; if ( $product->get_sku() ) { echo '<p><strong>' . __( 'SKU', 'woocommerce' ) . ':</strong> ' . $product->get_sku() . '</p>'; } }
Adding PHP: https://docs.generatepress.com/article/adding-php/
Hope this helps!
-
humbleit
Thats great. Thanks!
-
You’re welcome 🙂
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.