• Resolved Tony

    (@tonyzg)


    Hi!

    I need to get a category (catalog) name within the loop below:

    $loop = new WP_Query( array( 'post_type' => 'project', 'post_status' => 'publish'));
    while ( $loop->have_posts() ) : $loop->the_post(); 
    
    ...
    
    endwhile

    Tried get_the_category() function but it is not getting me a category name, probably because this is custom post type/taxonomy.

    Any ideas? Thx!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to get the category name for a custom post type?’ is closed to new replies.