Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dialaster

    (@dialaster)

    It should be like this:

    <a href="https://test.com/signup/" class="woocommerce-LoopProduct-link woocommerce-loop-product__link"><img src="//test.com/my-red-car-2.jpg" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail wp-post-image" alt="My Red Car" height="169" width="300"><h2 class="woocommerce-loop-product__title">My Red Car</h2>
    </a>
    • This reply was modified 7 years ago by dialaster. Reason: typo

    I think you would remove the open loop action and replace it with your own:

    remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );
    add_action( 'woocommerce_before_shop_loop_item', 'custom_loop_product_link_open', 10 );
    function custom_loop_product_link_open() {
      print '<a href="https://test.com/signup/" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">';
      // this is the link open tag only - the image and the title are output by other hooks 
    }

    Sorry not tested – PHP skills will be needed to get it working.

    The code goes in functions.php for your child theme or you could use the “My Custom Functions” plugin or similar.

    Thread Starter dialaster

    (@dialaster)

    Working great. Thanks ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Product page to cutom page?’ is closed to new replies.