Friends I need help.

Am extending the Mayashop theme for a friend & I ran into a problem.

Created a custom post type named watchdog, created a taxonomy for it called watchdog-brand ... now the single-watchdog.php template is working just fine but I can't seem to find the appropriate template for the term itself listing all of the watchdog items under it.

Tried archive-watchdog.php , archive-watchdog-brand.php but no luck ... any idea?

I also found out that it doesn't even fallback to the archive.php .. just straight forward to the index.php file

& here is the code for the custom_post & the taxonomy

     'description' => __('Watchdog', 'yiw'),
     'exclude_from_search' => false,
     'show_ui' => true,
     'labels' => yiw_label( apply_filters( 'yiw_watchdog_label_singular', __('Product', 'yiw') ), apply_filters( 'yiw_watchdog_label_plural', __('Products', 'yiw') ), __('Watchdog', 'yiw') ),
     'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
     'public' => true,
     'capability_type' => 'post',
     'publicly_queryable' => true,
     'rewrite' => array( 'slug' => apply_filters( 'yiw_watchdog_rewrite', 'watchdog' ), 'with_front' => true )


register_taxonomy('watchdog-brand', array( TYPE_WATCHDOG ), array(
    'hierarchical' => true,
    'labels' => yiw_label_tax(__('Brand', 'yiw'), __('Brands', 'yiw')),
    'show_ui' => true, 
    'show_in_nav_menus' => true,
    'query_var' => true,
    'rewrite' => array( 'slug' => 'watchdog-brand', 'with_front' => false )

Thanks in advance

2 Answers 2


Turned out to be an internal mayashop function in the taxonomy.php page that checks for two particular taxonomies if found populates their pages it not returns to the index.php

added my condition & all is well now, Thanks

* @package WordPress
* @subpackage Impero
* @since Impero 1.0

 if ( yiw_is_portfolio_tax( get_query_var('taxonomy') ) )
 get_template_part( 'portfolio' );

else if ( get_query_var('taxonomy') == 'category-photo' )  
get_template_part( 'gallery' );

else if ( get_query_var('taxonomy') == 'watchdog-brand' )  
get_template_part( 'watchdog' );

get_template_part( 'index' );

Try taxonomy-watchdog-brand.php instead.

  • Tried it not working but I think I've laid my hands on the code that's been doing all of this hassle .. mayashop has included a taxonomy.php file that checks on two particular taxonomies otherwise gets the index page added a condition for my taxonomy & all is good now Mar 29, 2013 at 9:04
  • The code provided should work though. The order in which the hierarchy executes is taxonomy-{taxonomy}-{slug}.php -> taxonomy-{taxonomy}.php -> taxonomy.php -> archive.php -> index.php. In your case the archive would be skipped, but my PHP file name should still come before your current taxonomy.php. Perhaps it's getting confused because you've registered the taxonomy slug with a dash - and it assumes that brand is the term inside taxonomy watchdog? Mar 29, 2013 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.