Move product title above product image on Woocommerce archive pages

后端 未结 2 1496
耶瑟儿~
耶瑟儿~ 2021-01-23 00:08

I am trying to move the product title above the product image on the product archive page. I have managed to figure out how to move the information, but the price is moving abov

2条回答
  •  再見小時候
    2021-01-23 00:43

    Try this below code

    Please change the code in below file

    wp-content/plugins/woocommerce/templates/content-product.php

    OR

    wp-content/theme/yourtheme/woocommerce/templates/content-product.php

        do_action( 'woocommerce_before_shop_loop_item' );
        do_action( 'woocommerce_before_shop_loop_item_title' );
        do_action( 'woocommerce_shop_loop_item_title' );
        do_action( 'woocommerce_after_shop_loop_item_title' );
        do_action( 'woocommerce_after_shop_loop_item' );
    

    Replace it

    do_action( 'woocommerce_shop_loop_item_title' );
    do_action( 'woocommerce_before_shop_loop_item' );
    do_action( 'woocommerce_before_shop_loop_item_title' );
    do_action( 'woocommerce_after_shop_loop_item_title' );
    do_action( 'woocommerce_after_shop_loop_item' );
    

提交回复
热议问题