IF taxonomy archive is hierarchical THEN

Look at the docs (please read the docs) for is_taxonomy_hierarchical(). You need to tell it which taxonomy you’re checking: if ( is_taxonomy_hierarchical( ‘my_taxonomy_name’ ) ) { } If you’re template isn’t specific to a taxonomy, and you need to know which taxonomy you’re viewing, use get_queried_object() to figure it out (you were already told how … Read more

get_term_link doesn’t work

I do not know how ACF works or how its data is stored, but in general, I would just use usort() to sort the returned array of terms via the ACF value of cognome_nome. Note that array_push is a bit expensive to use, so try to avoid that 😉 As I stated in comments, your … Read more

Taxonomy link not working (leads to 404 page)

It seems you do not have a template for your custom taxonomy. I do not think so single.php will be used for this purpose. Have a look on this ARTICLE.. Look at the hierarchy,,, I think in your case you need taxonomy-soortpost.php Taxonomy hierarchy: taxonomy-{taxonomy}-{term}.php taxonomy-{taxonomy}.php tag-{slug}.php tag-{id}.php category-{slug}.php category-{ID}.php

Order taxonomy terms by the frequency of use in the last 30 days

First thing’s first — You’ll have to add that table. The way you do that if you were writing this in a plugin is as follows: function customtaxorder_init() { global $wpdb; $init_query = $wpdb->query(“SHOW COLUMNS FROM $wpdb->terms LIKE ‘term_order'”); if ($init_query == 0) { $wpdb->query(“ALTER TABLE $wpdb->terms ADD `term_order` INT( 4 ) NULL DEFAULT ‘0’”); … Read more

Taxonomy template for all taxonomies attached to certain post type

the answer is yes, yes i can. do love it when i find the answer w/in minutes of posting here. add_action(‘template_redirect’, ‘my_template’); function my_template() { if ( is_tax() && in_array(get_query_var(‘taxonomy’), get_object_taxonomies(‘product’) ) ){ include (get_stylesheet_directory(). ‘/product_taxonomy.php’); exit; } }

Why is taxonmy-[taxonomyname].php not working?

I think this is because you use a reserved name: http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms Try changing in to something else like: register_taxonomy(‘portfolio_category’, ‘portfolio’, array(‘hierarchical’ => false, ‘label’ => ‘Category’,’query_var’ => true, ‘rewrite’ => true));

Description of a sub-taxonomy

Term description works only with term id and the taxonomy name, so if you want to get the sub term’s description, you should first get all the children of a term(and their children, if its another level deep) and loop over their ids with a single term_description call per id. <?php $my_taxonomy = ‘institute’; $terms … Read more

Implode Taxonomy to hide parents?

You can check if the resulting term has any children before adding it to the array: $terms = get_the_terms($wp_query->post->ID, ‘propertytype’); $props = array(); foreach ($terms as $term) { $hasChildrenTest = get_term_children($term->ID, ‘propertyType’); if ($term->parent) { if (empty($hasChildrenTest) && !is_wp_error($hasChildrenTest)) { $props[] = $term->name; } } echo implode(‘, ‘, $props); ps: the if($term->parent) test might become … Read more