Move add to cart in Woocommerce

I would like to have "add to cart" button nearby the price like in the picture.By default, the button is place

I would like to have "add to cart" button nearby the price like in the picture.

By default, the button is placed after the price in the code, and I would like to move the button in the same tag of the price.

But I don't know which template of Woocommerce I have to edit to make this.

Thank's !

I would like to have "add to cart" button nearby the price like in the picture.

By default, the button is placed after the price in the code, and I would like to move the button in the same tag of the price.

But I don't know which template of Woocommerce I have to edit to make this.

Thank's !

Share Improve this question asked Mar 28, 2019 at 10:06 user10533272user10533272 334 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

You can change the priority/order by removing and re-adding the parts you want the position changed - like this:

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 10 );

Drop this piece of code into your functions.php to take effect.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745650369a4638226.html

相关推荐

  • Move add to cart in Woocommerce

    I would like to have "add to cart" button nearby the price like in the picture.By default, the button is place

    4小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信