Taxonomy archive template not working

You have a taxonomy name Talks, this must be lowecase (talks). If you look at the register_taxonomy() Codex page the following parameter description is shown: <?php register_taxonomy( $taxonomy, $object_type, $args ); ?> $taxonomy (string) (required) The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces) and not … Read more

Show single Child Category on Custom Post

You can use get_term_children function. For Example: <?php $termID = 10; $taxonomyName = “region”; $termchildren = get_term_children( $termID, $taxonomyName ); echo ‘<ul>’; foreach ($termchildren as $child) { $term = get_term_by( ‘id’, $child, $taxonomyName ); echo ‘<li><a href=”‘ . get_term_link( $term->name, $taxonomyName ) . ‘”>’ . $term->name . ‘</a></li>’; } echo ‘</ul>’; ?>

Order taxonomy terms wordpress

You’re not setting an order anywhere for get_terms, you’re setting it for the query of articles within each term. You need to pass arguments to get_terms if you want an order other than default, which is ASC. $tax = ‘news’; $tax_args = array( ‘order’ => ‘DESC’ ); $tax_terms = get_terms( $tax, $tax_args );

Show all terms in a custom taxonomy with all child terms wrapped in a ul

You can take a look at the WordPress function wp_list_categories(). If you want to display all the terms within a given custom taxonomy you can for example use: <?php $args = array( ‘taxonomy’ => ‘my_custom_taxonomy_slug’, ‘orderby’ => ‘name’, ‘hide_empty’ => 0, ‘title_li’ => ”, ‘hierarchical’ => 1, ‘walker’ => null, ); ?> <ul class=”menu”> <?php … Read more

Show related posts on single.php, grouped by taxonomy terms, with Advanced Custom Field post object selected

I’d recommend creating 3 separate [‘associated_items’] fields instead of 1. For Example: [‘associated_articles’] & “Filter for taxonomy term: Articles” [‘associated_presentations’] & “Filter for taxonomy term: Presentations” [‘associated_news’] & “Filter for taxonomy term: News” Note: Filtering for the taxonomy term, limits the related posts available to choose from as well, which results in a better user … Read more

Get current page term title to use in WP_Query

Do what single_term_title does and check the queried object with get_queried_object. function single_tax_slug() { $term = get_queried_object(); if ( !$term ) return; if ( is_category() ) { $term_slug = $term->slug; } elseif ( is_tag() ) { $term_slug = $term->slug; } elseif ( is_tax() ) { $term_slug = $term->slug; } return $term_slug; } $slug = single_tax_slug(); … Read more