wordpress - How to add an "add to cart" button in single-product.php page in woocommerce? -


I am using woocommerce to develop an ecommerce site

Single-Product The problem I am facing in php is

I can not display the add to cart button under the product in this page.

So far I am using this code:

  & lt ;? Php // global $ post; Echo do_shortcode ('[add_to_cart id = "$ post- & gt; id"]'); ? & Gt;   

But so far no luck to me!

Perhaps you made a simple writing mistake? Try it out:

  & lt ;? Php echo do_shortcode ('[add_to_cart id =' '. $ Post- & gt; id.' "] ');); ? & Gt;    

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -