January 4, 2017 at 9:26 pm #8527
I would like to change the product template for the alternative product page layout.
I have edited the look and feel a bit to represent what I want to do. I can achieve a lot with css but I need to shuffle some elements in php i believe.
Can you point me in the right direction with template I need to adjust and what I need to move to get what I want? thanks!
I have added a screenshot of what i want, and what it is now out of the box.
the box with all meta information has been moved down underneath the wc-tabs in my screenshot.Private Content Hidden
- This topic was modified 1 week, 5 days ago by ecb21. Reason: maximum file size
Attachments:You must be logged in to view attached files.January 4, 2017 at 9:37 pm #8531
You can find a source code for the single product page in a file
basel/woocommerce/content-single-product.phpif you want to make some changes in its sturcture.
XtemosJanuary 6, 2017 at 8:42 am #8555
Thank you for the reply.
I have checked in that template but do not see the add to cart hooks and pricing for example, they are commented out as for which i conclude they are not being used in this template. furthermore i only see info on the sticky and compact template in there. I am using the alternative template.
ps. the notify me on follow up replies via e-mail does not work from this forum, I haven’t received anything.January 6, 2017 at 11:27 am #8558
Both price and add to cart are hooked to this hook
<?php /** * woocommerce_single_product_summary hook * * @hooked woocommerce_template_single_title - 5 * @hooked woocommerce_template_single_rating - 10 * @hooked woocommerce_template_single_price - 10 * @hooked woocommerce_template_single_excerpt - 20 * @hooked woocommerce_template_single_add_to_cart - 30 * @hooked woocommerce_template_single_meta - 40 * @hooked woocommerce_template_single_sharing - 50 */ do_action( 'woocommerce_single_product_summary' ); ?>
If you want to change their order you need to remove and add actions with different priorities. Here is an article that should help you https://wpthememakeover.com/2016/03/07/how-to-customize-the-woocommerce-single-product-page/
RegardsJanuary 6, 2017 at 11:27 am #8559
If you don’t get emails from this topic then click on “Subscribe” button in the topic header.January 6, 2017 at 11:44 am #8560
Thank you, but i cannot move the single_meta to underneath the tabs through the hooks. I have done the following:
-create a function.php in my child theme and added these lines.
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_meta’, 40 );
add_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_template_single_meta’, 14 );
I noticed that is in another box (after_single_product_summary) and that the action does not work.January 6, 2017 at 11:53 am #8561
Never mind, it has been fixed. forgot to update the php file to the server lol.
Thank you!January 6, 2017 at 2:34 pm #8562
Guys, I have made some adjustments, but the hook for the “in stock” is nowhere to be found. I also checked online if i can find something about it but i haven’t found anything.
i would like to get the in/out stock notification behind the price.
Could you point me in the right direction? I am almost there!Private Content HiddenJanuary 6, 2017 at 4:23 pm #8567
In/out of stock is connected to “Add to cart” hook and can’t be moved with actions. You can find its source code in add to cart templates located in
You must be logged in to reply to this topic.