I want to get the category name of custom post type in query posts loop.
here is my code:
query_posts(array('post_type'=>'portfolio','posts_per_page'=>4, 'orderby' => 'ID', 'order' => 'DESC' ));
while ( have_posts() ) : the_post();
<li>
<div class="foli_img"> <a href="<?php echo get_permalink();?>"> <span class="next"> </span> </a> <?php the_post_thumbnail();?> </div>
<h3 class="style"><?php the_title();?></h3>
<?php the_content();?>
<h4><a href="#">I want the category name here</a></h4>
</li>
<?php endwhile;?>
Try This
or
Try get through terms :