Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rajucs/5627b970b3d767d2cf512569295603bc to your computer and use it in GitHub Desktop.
Save rajucs/5627b970b3d767d2cf512569295603bc to your computer and use it in GitHub Desktop.
add_action( 'woocommerce_after_shop_loop_item', 'add_loop_custom_button', 1000 );
function add_loop_custom_button() {
global $product;
$product_link = $product->get_permalink(); // Link to the product (if needed)
// Define your button link
$custom_link = home_url( "/something/" ) ;
// Output
echo '<div class="product_meta wcdp-preview-btn-div">
<a class="button thickbox" href="' . esc_url( $custom_link ) .'">' . __( "Citește fragment" ) . '</a>
</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment