Is there a template file to list all terms of a given custom taxonomy?

You can include the same file in template-composers-terms.php and template-interprets-terms.php like that : <?php /* Template Name: List of composers */ $tax = “composer”; require “include/file_which_does_all_the_work.php”; and if the page slug is the same that the taxonomy slug, you can save the line $tax = … with that in the included file : $tax = … Read more

How do I check if the user is on a taxonomy term parent, child or grandchild page?

Try get_ancestors(): $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) ); $ancestors = get_ancestors( $term->term_id, ‘product_range’, ‘taxonomy’ ); $hierarchy_levels = count( $ancestors ); switch ( $hierarchy_levels ) { case 0: // THIS IS THE PARENT CATEGORY // DO YOUR STUFF break; case 1: // THIS IS THE PARENT CATEGORY // DO YOUR STUFF … Read more

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