Replace Add to cart button with read more link in Woocommerce product pages

Before adding read more link we need to remove the Add to cart button from the Woocommerce product loop. For this we can use following code snippet.

//Remove add to cart button from the product loop
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');

We have successfully removed Add to cart button from the product archives. Now we need to add read more link to each product. For this we will use following code snippet.

//Add read more button in product loop
function add_read_more_button_product_loop() {
    echo '<a class="button" href="'.get_permalink().'">'.__('Read more','woocommerce').'</a>';
add_action( 'woocommerce_after_shop_loop_item', 'add_read_more_button_product_loop', 20 );
Need a helping hand in fixing your website issues?

If you are facing any problems in implementing these code snippets and tutorials, you can hire us to fix your website issues.

Hire Us