reorder the hooks on single product page
-
Hi people,
I try to reorder the hooks for the single product page.
this is what i want
———–titel
picture —–product description
— —– cart
tumbs
—
share
—
upsellbut the share and upsell hook are in the woocommerce_single_product_summary hook and before_single.
so i changed like thisremove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 ); remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 ); remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 ); remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); /////hooks toevoegen in de goede orde //////// add_action( 'woocommerce_before_single_product_summary', 'woocommerce_template_single_sharing', 25 ); add_action( 'woocommerce_before_single_product_summary', 'woocommerce_upsell_display', 25 ); function woocommerce_template_product_description() { woocommerce_get_template( 'single-product/tabs/description.php' ); } add_action( 'woocommerce_single_product_summary', 'woocommerce_template_product_description', 20 );
but now i got a css problem because if you look at the site the product titel will start bellow the upsell.
i thought it whas because the share and upsell div where to width but even when i make it smaller it wont work.
anybody a solution?
link to the site https://www.medischwijzer.nl/product/happy-ninja/
- The topic ‘reorder the hooks on single product page’ is closed to new replies.