php - Adding a "return to shop" button on single product pages that leads back to product parent category -


my client wants place "return shop" button on single product pages in woocommerce leads the previous page , not main shop page.

i have explained browsers have buttons dead set on having button. i've mentioned activating breadcrumbs don't either.

how can achieve that. appreciated.

you category id using bellow code , add if condition show like

$product_category = wp_get_post_terms( $post->id, 'product_cat' ); 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -