display category name based on its equivalent id
to convert it from category id to category name when I echo $slidecat it shows cat id of “burger” which is 16 You can use get_term_field() to get the term/category slug by ID: // Get the slug and then pass it to WP_Query. $cat_slug = get_term_field( ‘slug’, $slidecat, ‘product_cat’ ); $args = array( ‘post_type’ => … Read more