Skip to content
Advertisement

Tag: taxonomy-terms

Filter a custom product loop to get products from a category in WooCommerce

I have this function which calls me all products type “promotion_package” in WooCommerce: I would like to get only products from “vip” product category. I tried using $product->get_categories() to find “vip” category, but it didn’t worked. How can I show only products from “vip” category? Answer You can try has_term() conditional function for ‘product_cat’ procuct category taxonomy as follows: It

Get taxonomy name

I’m trying to modify a theme that has custom posts with custom taxonomies. At the bottom of the posts it displays a list of other posts (as in “you might also like…”) What I’m trying to do is to filter the posts that are displayed in that area so they match the category of the current post. It’s a tour

Advertisement