Show only 1 term of a current posts taxonomy

This is more PHP than WordPress, but wp_get_post_terms returns a numerically indexed array, so all you need is basic PHP array syntax to grab the first item. $terms = wp_get_post_terms($post->ID, ‘custom_cat’); print_r($terms[0]->name); You don’t specify which item you want. This will get you last item: $terms = array_pop($terms); print_r($terms);

How can i retrieve all custom registered taxonomy?

The built-in taxonomies are registered with the parameter _builtin set to TRUE. To get all custom taxonomies, ask for ‘_builtin’ => FALSE: add_action( ‘wp_footer’, function() { $taxonomies = get_taxonomies( array( ‘_builtin’ => FALSE ) ); print ‘<pre>’ . print_r( $taxonomies, 1 ) . ‘</pre>’; });

Display only first level children of my custom taxonomy categories

Try the following code: $taxonomy_name=”listing_category”; $queried_object = get_queried_object(); $term_id = $queried_object->term_id; $termchildren = get_terms( $taxonomy_name, array( ‘parent’ => $term_id, ‘hide_empty’ => false ) ); echo ‘<ul>’; foreach ( $termchildren as $child ) { echo ‘<li><a href=”‘ . get_term_link( $child, $taxonomy_name ) . ‘”>’ . $child->name . ‘</a></li>’; } echo ‘</ul>’;

Exclude Taxonomy Terms from Template Via Back End?

You might be able to accomplish this using Advanced Custom Fields: http://www.advancedcustomfields.com/resources/taxonomy/ Field groups, like the taxonomy field, can be assigned to templates. Editing the taxonomy archive page, the user would see checkboxes (or radio buttons, or a select menu) for the taxonomy terms. In the corresponding “taxonomy archive” template (from link above)… <?php $terms … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)