custom taxonomy not displaying
category.php template file is only for core categories taxonomy. The equivalent for custom taxonomies is taxonomy.php. See template hierarchy for more information.
category.php template file is only for core categories taxonomy. The equivalent for custom taxonomies is taxonomy.php. See template hierarchy for more information.
If your URL structure is valid and correct, all you need then is the default loop. The main query runs on each and every page request, and the parameters passed to WP_Query ( yes, the main query also uses WP_Query) is determined by the URL and rewrite rules for that specific page. If your URL … Read more
Showing list of custom posts of a custom taxonomy
where it should be placed whether in page-template directory or at theme root directory? It should be placed at the root directory of the the active theme. If you take a look at template heirarchy, you can see that for taxonomy the flow is: taxonomy-$taxonomy-$term.php –> taxonomy-$taxonomy.php –> taxonomy.php So the correct name for term … Read more
Custom taxonomy escaping html attr
Solved the issue by passing the term_name as a parameter to the callback function to the filter. function bn_term_title( $term_name ) { $term_types = get_term_by( ‘name’, $term_name, ‘tax_1’ ); if( $term_types->taxonomy === ‘tax_1’ ) { if( get_locale() === ‘bn_BD’ ) return get_term_meta( $term_types->term_id, ‘tax1_bn’ ); else return $term_name; } $term_categories = get_term_by( ‘name’, $term_name, ‘tax_2’ … Read more
Sort Taxonomy List by Custom Values
I’ve managed to figure this out myself, so if anyone out there needs some help please try the following… Using the get_terms rather than trying to query it directly. <?php $terms = get_terms(‘custom-tax-name’, array(‘hierarchical’ => false)); foreach ($terms as $term) { $term_link = get_term_link( $term ); if ( have_posts() ) : ?> <a href=”https://wordpress.stackexchange.com/questions/199223/<?php echo … Read more
You can use get_queried_object to return the full queried term object on a taxonomy archive page. $term = get_queried_object(); if( 0 === $term->parent ){ // term is top level } else { // term has parent }
After reviewing the code more & more I found the solution. So, for those who have interest in such thing: change false to true in use_with_theme change template path to stylesheet path in tax-meta-class.php Cheers