Custom taxonomy template loop

The way I read you question is that you need 12 posts per page in this taxonomy regardless of the current term been displayed. This can be easily done with pre_get_posts. You should never change the main query for a custom query on archive pages. Have a read on this answer I’ve recently done on … Read more

Get current page’s taxonomy

Like Rarst, I am confused what you want to output, the taxonomy or the terms of that taxonomy. Taxonomy can be output for example if you make a template file with the name of that taxonomy: taxonomy-name.php the title of the taxonomy then becomes: <h1 class=”page-title”><<?php $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ … Read more

How to include parent terms in hierarchical taxonomy URLs?

Just clarifying, what was pointed out by Parst with a working example of a custom taxonomy registration code: $labels = array( ‘name’ => _x( ‘Issue numbers’, ‘taxonomy general name’, ‘sascha_setup_post_type’ ), ‘singular_name’ => _x( ‘Issue number’, ‘taxonomy singular name’, ‘sascha_setup_post_type’ ), ‘search_items’ => __( ‘Search issues’, ‘sascha_setup_post_type’ ), ‘all_items’ => __( ‘All issue numbers’, ‘sascha_setup_post_type’ … Read more

Taxonomy Relationships

Taxonomies are not child of each other unlike terms, which can be. Take a look at this flowchart: Model is a child of Make, and should not be registered as a new taxonomy. What you are trying to do, is something like setting Ford as a child of Honda, which is not right. Instead, register … Read more

Looping Through Custom Tax Terms and Displaying All Posts For Each

If your things are laid properly, this code will output 10 posts from film CPT, where taxonomy is category-film and it will occur each of the term of that particular taxonomy. I’m not aware about your templating, so lay your layout accordingly. <?php $_terms = get_terms( array(‘category-film’) ); foreach ($_terms as $term) : $term_slug = … Read more

WP_insert_term how to insert multiple values as taxonomny term?

I would build the input fields for terms as array of inputs. Like this (note the [] inthe name attribute: <input name=”input_name[]” type=”text” value=””> <input name=”input_name[]” type=”text” value=””> <input name=”input_name[]” type=”text” value=””> Then, in PHP: //Now $_POST[‘input_name’]; is an array //get the array and sanitize it $input_terms = array_map( ‘sanitize_text_field’, $_POST[‘input_name’] ); //Set the array … Read more

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