Home › Forums › WoodMart support forum › Product Page
Product Page
- This topic has 11 replies, 2 voices, and was last updated 7 years, 3 months ago by
Artem Temos.
-
AuthorPosts
-
December 30, 2017 at 1:54 pm #31030
leds-prosParticipantHello,
I use Woodmart Theme for several clients. Very nice theme.
Unfortunatly, most of them ask ofen to me the same thing.
So, as it’s Christmas could you do something for this 😉
I try to explain you in the attachment.
1/ RÉFÉRENCE ( = UGS ) under the Title
2/ Hide only ” Catégories ”
3/ Have ” DIFFÉRENCES ” just above ” AJOUTER AU PANIER ”
I know it is work for you, so thanks a lot for your help.
Best Regards,
Leds-ProsAttachments:
You must be logged in to view attached files.December 30, 2017 at 4:59 pm #31032
leds-prosParticipantIt is not Chrismas 😉
December 31, 2017 at 1:24 pm #31073
Artem TemosKeymasterHi,
Try to add the following PHP code snippet to the child theme functions.php file to do this
add_action( 'woocommerce_single_product_summary', 'woodmart_show_sku', 5 ); function woodmart_show_sku(){ global $product; $sku = $product->get_sku(); if ( $sku ) { echo '<span class="sku_wrapper under-title">SKU: <span class="sku">' . $sku . '</span></span>'; }else{ echo '<span class="sku_wrapper under-title">SKU: <span class="sku">N/A</span></span>'; } }
and this is for Custom CSS
.product_meta .sku_wrapper, .product_meta .posted_in{ display: none !important; } .sku_wrapper.under-title{ margin-bottom: 10px; display: block; color: #333; font-weight: 600; font-size: 14px; } .sku_wrapper.under-title span{ color: #777; display: inline-block; font-weight: 400; margin: 0 1px; }
Regards
December 31, 2017 at 1:28 pm #31074
leds-prosParticipantThanks a lot, I know that is some work for you.
It’s Chrismas indeed 😉
Great Thanks,
you can close the topic.
Best Regards and have a very good end of year.
Best Regards,
Leds-ProsDecember 31, 2017 at 1:43 pm #31075
leds-prosParticipantSorry, it seems that the sku is not re-copy with variable products.
It works only for single product.Attachments:
You must be logged in to view attached files.December 31, 2017 at 4:36 pm #31095
Artem TemosKeymasterCould you please provide us your admin access so we can check it?
December 31, 2017 at 4:38 pm #31096
leds-prosParticipantOf course. It’s done
December 31, 2017 at 4:54 pm #31098
Artem TemosKeymasterSorry, but we can’t login with this data. Could you please check it?
December 31, 2017 at 5:28 pm #31100
leds-prosParticipantSure ?
January 1, 2018 at 1:50 pm #31133
Artem TemosKeymasterTry to replace previous code with this one
function woodmart_sguide_hook(){ remove_action( 'woocommerce_single_product_summary', 'woodmart_sguide_display', 38 ); add_action( 'woocommerce_before_add_to_cart_button', 'woodmart_sguide_display', 20 ); } add_action( 'wp_loaded', 'woodmart_sguide_hook', 20 ); function woodmart_show_sku(){ global $product; $sku = $product->get_sku(); if ( $sku ) { echo '<div class="product_meta under-title"><span class="sku_wrapper">SKU: <span class="sku" data-o_content="' . $sku . '">' . $sku . '</span></span></div>'; }else{ echo '<div class="product_meta under-title"><span class="sku_wrapper">SKU: <span class="sku" data-o_content="N/A">N/A</span></span></div>'; } } add_action( 'woocommerce_single_product_summary', 'woodmart_show_sku', 5 );
And add the following CSS
.product_meta.under-title .sku_wrapper{ display: block !important; padding-top: 0; border: 0; }
Regards
January 1, 2018 at 8:22 pm #31169
leds-prosParticipantThanks a lot for your help.
Happy new year.
Leds-ProsYou can close the topic. Thanks for your help and great work.
January 2, 2018 at 7:12 am #31189
Artem TemosKeymasterGreat, you are welcome!
Happy new year!
-
AuthorPosts
The topic ‘Product Page’ is closed to new replies.
- You must be logged in to create new topics. Login / Register