- This topic has 1 reply, 2 voices, and was last updated 4 years, 1 month ago by Andrew Misplon.
Tagged: WOOCOMERCE POLESTAR THEME
- AuthorPosts
- September 24, 2020 at 11:57 am #14973
BUATON michelParticipanthello
I want the attributes of simple products to be below the product title and not in the “additional information” table.
thank youSeptember 24, 2020 at 7:20 pm #14976
Andrew MisplonKeymasterHi Michel
Thanks for reaching out.
If you’d prefer to use email support, you’re welcome to do so. [email protected].
* Go to Plugins, search for and install a plugin called Code Snippets.
* Go to Snippets > Add New, name your snippet as you’d like, and insert into the snippet body:/** * Remove product data tabs as required. */ function polestar_child_remove_product_tabs( $tabs ) { global $product; if ( $product->is_type( 'simple' ) ) { unset( $tabs['additional_information'] ); // Remove the additional information tab. } return $tabs; } add_filter( 'woocommerce_product_tabs', 'polestar_child_remove_product_tabs', 98 ); /** * Displays product attributes before the Add to Cart form. */ function polestar_child_display_attributes() { global $product; if ( ! $product->is_type( 'simple' ) ) return; wc_display_product_attributes( $product ); } add_action ( 'woocommerce_single_product_summary', 'polestar_child_display_attributes', 5 );
Set the snippet to run on the site front-end. Click the Save and Activate button.
Once the snippet is working, please, let me know if you need small styling/spacing adjustments, I’ll assist further from there.
Thanks
- AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.