display category name based on its equivalent id
I have a theme with options. I would like to display 3 posts for a specific woocommerce category, I could show category id and I don't know how to display products based on its category id, but I have code snippet it shows products by woocommerce category name. So I need now to a selected category name not its id, or to convert it from category id to category name?
I tried following but it did not work at all. Any help will be apreciated, I'm struggling with this 2 days.
$slidecat =theme_get_option('theme_slide_categories');
$args = array(
'post_type' = 'product',
'posts_per_page' = 3,
'product_cat' = 'burger',
'orderby' ='date',
'order' = 'ASC' );
$loop = new WP_Query( $args );
while ( $loop-have_posts() ) : $loop-the_post();
global $product;
the_title(); ?
?php endwhile;
wp_reset_query(); ?
when I echo $slidecat it shows cat id of burger which is 16.
options area
$options[] = array( 'name' = __('Slider Category', 'theme'),
'desc' = __('Select a category for the featured post slider', 'theme'),
'id' = 'theme_slide_categories',
'type' = 'select',
'class' = 'hidden',
'options' = $options_categories);
I hope code I've supplied here is enough to get help. Thanks everybody
Topic theme-options framework options Wordpress
Category Web