Home Forums WoodMart support forum After "Add to cart button" text area for different products

After "Add to cart button" text area for different products

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #266760

    Hi
    I want to add some custom content after “Add to cart” button using Theme Settings < Single product page options < After “Add to cart button” text area function. But I want to create different content for different products. Is it possible?

    #266819

    Hello,

    This option is global, it shows one and the same content for all the products.

    You can use an Extra content block. These blocks would show individual content of the product.

    If you want this content to be exactly after add to cart button, add this code to the functions.php of the child theme:

    add_action(
    	'wp',
    	function() {
    		remove_action( 'woodmart_after_product_content', 'woodmart_product_extra_content', 20 );
    		add_action( 'woocommerce_single_product_summary', 'woodmart_product_extra_content', 31 );
    	},
    	1200
    );

    If you have any questions please feel free to contact us.

    Best Regards

    #266842

    Thanks, it worked.

    One more question about this, is it possible to add this content after share buttons in the product pages?

    #266935

    Hello,

    Do not add any code and set showing “After content” the block would appear just after share buttons.

    Best Regards

Viewing 4 posts - 1 through 4 (of 4 total)