Support » Plugin: WooCommerce » Link to a product

  • Hello,

    On the WooSlider I want to my ‘read more’ link to link to the products page.

    Here is the site:

    I’m using the following code in my add-to-cart.php file
    $link['url2'] = home_url('/').'$product->id';
    but I know the code $product->id is incorrect.

    The code above is used with:

    echo apply_filters( 'woocommerce_loop_add_to_cart_link', sprintf('<a href="%1s" rel="nofollow" data-product_id="%2s" data-product_sku="%3s" class="cart">read more</a>', esc_url( $link['url2'] ), esc_attr( $product->id ), esc_attr( $product->get_sku() ), esc_attr( $link['class'] ), esc_attr( $product->product_type ), esc_html( $link['label'] ) ), $product, $link );

    Thanks for your help

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Link to a product’ is closed to new replies.