adding a new div in the functions.php of the bridge-child
-
Hi everbody,
to create a new div (with the class .custom-div-single-product-add)
around the “cart form” in single product pages,
i added the following code
in the functions.php of the bridge-child:add_action( ‘woocommerce_before_add_to_cart_form’, ‘add_custom_content_for_specific_product2’, 25 );
function add_custom_content_for_specific_product2() {// The content start below (with translatables texts)
?>
<div class=”custom-div-single-product-add”>
<!– <p><?php _e(“o”, “woocommerce”); ?></p>
</div> –>
<?php
// End of content
}
add_action( ‘woocommerce_after_add_to_cart_form’, ‘add_custom_content_for_specific_product’, 25 );
function add_custom_content_for_specific_product() {
global $product;// The content start below (with translatables texts)
?>
<!– <div class=”custom-content product-id-<?php echo $product->get_id(); ?>”>
<p><?php _e(“c”, “woocommerce”); ?></p> –>
</div>
<?php
// End of content
}now there is a problem in line 16 (‘add_custom_content_for_specific_product’, 25 );).
could it be that it is the number 25, because its doubled at the moment?!thanks in advance
mazzeThe page I need help with: [log in to see the link]
- The topic ‘adding a new div in the functions.php of the bridge-child’ is closed to new replies.