tytuł kategorii custom post
–
<h2>Kategoria: <span><?php $term_list = wp_get_post_terms($post->ID, 'custom-category', array("fields" => "names")); echo $term_list[0]; ?></span></h2> <?php //Returns Array of Term Names for "my_taxonomy" $term_list = wp_get_post_terms($post->ID, 'postepowania-category', array("fields" => "names")); print_r($term_list); ?>
–
pobranie parent name custom taxonomy:
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); $parent = get_term($term->parent, get_query_var('taxonomy') ); echo $parent->name; ?>
–
Hope this helps and happy coding :)
Zobacz jeszcze
pobranie listy wpisów custom post
Wykaz wszystkich wpisów konkretnego Custom Post <?php $args = array( 'post_type' => 'custom_post_name', 'posts_per_page' => -1, 'orderby' =>...