Yazıya ait kategoriler arasına virgül eklemek
get_the_term_list( get_the_ID(), 'sort' kod bloğunda 'sort' özel yazı tipine ait taxonomy adıdır. Özel yazı tipine taxonomy register_taxonomy(); ile eklenir.
$categories_of_cders = get_the_term_list( get_the_ID(), 'cders', '', ', ', '' ); if ( $categories_of_cders ) printf( __( '%1$s', 'edumust' ), $categories_of_cders );
much better to use it like following:
//Canli Derslerin Kategorileri
if ( ! function_exists( 'live_course_categories' ) ) :
function live_course_categories() {
$categories_of_cders = get_the_term_list( get_the_ID(), 'cders', '', ', ', '' );
if ( $categories_of_cders )
printf( __( '%1$s', 'edumust' ), $categories_of_cders );
}
endif;
//End
fonksiyonu çağırmak
live_course_categories();
Yorumunuzu ekleyin
Yorum yapmak için giriş yapmalısınız.