Viewing 1 replies (of 1 total)
  • Thread Starter jothikannan

    (@jothikannan)

    Hi,

    Sorry i got it by the following code

    $terms = get_the_terms(get_the_ID(), 'event-categories' );
    if ($terms && ! is_wp_error($terms)) :
    	$term_slugs_arr = array();
    	foreach ($terms as $term) {
    	    $term_slugs_arr[] = $term->name;
    	}
    	$terms_slug_str = join( " & ", $term_slugs_arr);
    endif;
    echo $terms_slug_str;
Viewing 1 replies (of 1 total)
  • The topic ‘Get event category by post in loop’ is closed to new replies.