Show all custom post type posts sorted by custom taxonomy then by another custom taxonomy

First get a list of categories and a list of locations. Then loop through each category. Within each category loop through the list of locations and query posts that have the current category and the current location and output the list: $categories = get_terms( array( ‘taxonomy’ => ‘shop_category’, ) ); $locations = get_terms( array( ‘taxonomy’ … 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

Define permalinks for custom post type by taxonomy in WP 3.4

Solution I have figured it out with the help of these posts by Jan Fabry -> https://wordpress.stackexchange.com/a/5478/10350 https://wordpress.stackexchange.com/a/22490/10350 I have set up the custom post type as follows -> Custom post type (register_post_type) -> “product” Taxonomy (register_taxonomy) -> “product-type” Back-end function I rewrite the permalink structure that is saved in the back-end, so that the … 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

Custom Taxonomy order by Custom Field

Ok so after posting the question an option to view another similar question appeared. So here is the answer if somebody is trying to do the same thing. //Using WordPress Pre-Get filter to order the custom taxonomy by custom field function customize_customtaxonomy_archive_display ( $query ) { if (($query->is_main_query()) && (is_tax(‘custom-taxonomy’))) $query->set( ‘post_type’, ‘your-post-type’ ); $query->set( … Read more