Tips and Tricks HQ Support Portal › Forums › Simple PayPal Shopping Cart › Simple Shopping Cart Tweaks › "Add to Cart" button not in "the_content" › Reply To: "Add to Cart" button not in "the_content"
January 20, 2010 at 5:35 am
#17385
Participant
You don’t need to change the line… you can just add the following line and it will filter the content as well as the excerpt:
add_filter(‘the_excerpt’, ‘print_wp_cart_button_new’,11);
To display a button on the sidebar use the following PHP function (you can pass in the product name and price to the function):
<?php echo print_wp_cart_button_for_product(“PRODUCT-NAME”, “PRODUCT-PRICE”); ?>