On category archives (or any the archive for any taxonomy term) you can get the current term with get_queried_object()
.
If you just need the ID you can use get_queried_object_id()
.
If you want to output the name of the term, you can use single_term_title()
.
Keep in mind that archive-product.php will also be used for the Shop page, for all products, so make sure to check is_product_category()
before using any of the above functions.
Related Posts:
- Detect whether a page is a product subcategory page?
- Display Categories Assigned to a WooCommerce Product
- How to show “Previous Category” and “Next Category” in categories archieve template [closed]
- woocommerce – how to get product link by id
- Display data when category is empty
- I’m trying to display product categories on each product in the list
- Category with description and thumbnail
- Add category description on product page (Woocommerce)
- Link Back to Parent Category – Woocommerce
- Retrieve Product category ‘NAME’ by product category ID – WooCommerce?
- How to display product price of the product in loop
- Limit users to one active subscription in WooCommerce Subscriptions? [closed]
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- How do I add a text input field for customers to leave a note on a single WooCommerce product page?
- Use get_term_children to get the sub category of a parent category for the current post
- WooCommerce HTML after short description if product is in specific category
- How to echo billing phone number under My Account in Woocommerce? [closed]
- Unknow php file in wordpress core [closed]
- woocommerce_get_price filter hook not working for product variation price
- Woocommerce SKU on ALL products page [closed]
- Stop WooCommerce from updating user/user meta after checkout
- Displaying Custom Input Value to Customer Order Details (My Account) page in Woocommerce
- Woo API REST : product variation price is read-only?
- Get rid of product images mobile swipe functionality from WooCommerce single product [closed]
- Omit specific product categories from WooCommerce shortcode
- Add custom order meta to Order Completed email
- How to upload Woocommerce product images via API? [closed]
- how to do a processing Orders into Complete after x Minutes or x hour in WooCommerce [closed]
- Tax Query for custom Taxonomy field
- Do I need a different product type for WooCommerce [closed]
- Feed format for woocommerce [closed]
- Redirect to another page using contact form 7? [closed]
- Override static method in WC_Shortcodes class (shortcode) [closed]
- Show add to cart button and quantity field when no price is entered [closed]
- How to get woocommerce product collection in template file
- Results not being printed
- Remove ‘product’ & ‘product-cateogory’ from url – woocommerce [closed]
- Is there a hook in woocommerce for when a payment fails to display a custom error message?
- How to show notice alert only on product dashboard page?
- Retrieving Tag Name in Template Part from Filtered URL
- ajax request in wordpress
- Woocommerce product rewrite rules not working
- How to display a table below each product in product list/loop
- how to remove this image? [closed]
- separate functions for home VS other pages
- WooCommerce apply shipping rates based on price
- Extra items added to cart on refresh, woocommerce
- How disable some product features on woocomerce?
- Filter WooCommerce archive pages by an additional category
- WooCommerce – Split Multiple Items into Individual Line Items
- Change “Select Options” label in button to “Buy Now!” in store page
- How to add a special Woocommerce “buy now” button?
- Woocommerce: Any way to list all products *without* a specific attribute?
- Woocommerce product import exports product with price rounded to integer? [closed]
- How to hook to function of woocommerce product export _regular_price?
- Filter by Price filter button not working
- porto theme pagination on woocommerce not working
- Adding preference buttons to main nav that persist via user sessions. (Woocommerce)
- Woocommerce custom log in and register
- Get category slug of the Parent category of a Product
- Is doing a database query in Woocommerce efficient to only display posts from a certain category?
- Call product search from custom hook
- CallBack URL for payment gateway redirecting to homepage instead of executing callback function
- Display when items are in Woocommerce cart but hide when empty
- Printing product variation return array to string conversion error
- woocommerce deposit Form with AJAX and shortcode won’t update but add to previous output
- How to get cookie value?
- Woocommerce Disabling Auto Restocking for Cancelled Orders
- Custom pagination permalink structure Product page
- Sudden 404 pages on product category archives
- Is there a reason to put a product in both the Child and Parent Categories?
- Woocommerce modifying the html on the checkout page?
- Pseudo class :before don’t working in a specific button
- How to speed up “My Account > Orders Page” on Site with More than 200,000 orders?
- Editing product categories suddenly crashes website and goes back to wordpress installation
- ACF in WooCommerce mail template
- WooCommerce product details page category display
- Woocommerce – Default product image by user role
- WooCommerce product id as permalink
- Merge “description” and “additional informations” product tab
- I need to refresh the checkout page if someone changes the zip code
- Add suffix to price html does not work
- Get user active posts randomly
- add_filter not works in ajax
- WooCommerce change
- How to skip woocommerce checkout after payment page? [closed]
- Website Tablet Check Out Field Issue
- WooCommerce order created via REST – sending the date_created along
- Add confirmation popup on place order button
- No results found for second level category
- Get Third Level Categories WooCommerce
- Change wp-login.php? Problem with .htaccess password protection and multi user shop
- Conditional email recipient based off Shipping Method [closed]
- Change WooCommerce Checkout Button – Reverts to normal
- Show pop up message for specific categoryies
- How to remove content from hacked pages? [closed]
- Disable WooCommerce Address State Dropdown
- How to show detailed order history on woocommerce product page [closed]
- Woocommerce Force the category choice before creating new product? [duplicate]
- Woocommerce permalink URL change in DB