Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WooCommerce Theme Development Global and Product Templates and Hooks Loop Template Files

woocommerce get product category id

I have problem, this very simple question but very important fore me. Thanks fore reading! My Problem: I'm create presentation page with different category. Each presentation blog have title, description, thumbnail and litel custom menu widget where sub category. My page Cases&Bag have section Bags information about Bag, title, description and have custom menu widget where link category Women-Bags and Men-Bags. But under this section i need custom buttom with link to just category all Bags. And need put Buttom

// Get the ID of a given category
$category_id = get_cat_ID( '62' );

// Get the URL of this category
$category_link = get_category_link( $category_id );
?>

<!-- Print a link to this category -->
<a href="<?php echo esc_url( $category_link ); ?>" class="btn btn-default btn-lg manage-btn " role="button" title="SHOW ALL BAGS">SHOW ALL BAGS</a>```  This My code.