Support

Account

Home Forums Front-end Issues Displaying a category ID Reply To: Displaying a category ID

  • If you want to get the category of your Promo Box, just use this code:

    
    $terms = get_the_terms( $post->ID, 'category' );
    $term = array_pop( $terms );
    
    
    query_posts( array ('posts_per_page' => 5, 'order'=> 'DESC', 'orderby' => 'date', 'category__in' => $term->term_id )