How to define the template priority between built-in categories and custom taxonomies?

You can tell WordPress what template file to use with the template_redirect hook. add_action( ‘template_redirect’, ‘wpse98738_taxonomy_redirect’ ); function wpse98738_taxonomy_redirect() { if( ‘x’ == $customtax && ‘y’ == $category_name ) { include( get_template_directory() . ‘/taxonomy-customtax.php’ ); // if you’re using a Child Theme, use the following line instead: // include( get_stylesheet_directory() . ‘/taxonomy-customtax.php’ ); exit; // … Read more

Archive-custome_post.php template not working

Your pre_get_posts filter is incorrect. You are altering more queries than I think you think you are. The “main” query isn’t just the primary index. You are adding (or attempting to add) all of those post types to every page, basically,– the author archives, the categories, everything. Try this: add_action( ‘pre_get_posts’, ‘add_my_post_types_to_query’ ); function add_my_post_types_to_query( … Read more

Custom term templates

If you look at the template hierarchy, you need to create a template taxonomy-{$taxonomy}-{$term}.php. In your case, that template will be called taxonomy-product_cat-awesome.php where I assumed the slug of your term is awesome Just a tip, the “categories” of a custom taxonomy is called terms. The build in taxonomy category “categories” is also called terms, … Read more

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