I tried the above code. I am doing portfolio filtering with jQuery and Css, so i need to retrieve the slug name of taxonomy 'portfolio_category' under which i have added categories like css, web-design. I want to retrieve the category under that taxonomy 'portfolio_category' by slugs name of the category i have added. Please, i need help!
foreach(get_the_terms($wp_query->post->ID, 'portfolio_category') as $term){ echo $term->slug; }