Custom Taxonomy template not display

There are a couple of different solutions if you want to have only the /holliday/project-location/ URL and not separate archive and taxonomy URLs. Option 1: Use the template_include() filter. I think this code would work but have not tested: add_filter( ‘template_include’, ‘holliday_template’, 99 ); function holliday_template( $template ) { if ( is_post_type_archive( ‘holliday’ ) ) … Read more

CPT Taxonomy As Archive Page – Error 404

You use the same slug clubs to register your custom post type and in rewrite when you register opposition taxonomy. Change rewrite parameter in register_taxonomy() ‘rewrite’ => array( ‘slug’ => ‘clubs/opposition’, ‘with_front’ => false ), The recognizable address will be clubs/opposition/{some-term-name} and will display posts from custom category. However, the clubs/opposition address will still not … Read more

What are these undocumented arguments for register_taxonomy?

I suspect the Taxonomies Codex entry is simply out of date. Per source, there are no ‘sort’ or ‘orderby’ args for register_taxonomy(). Given the purpose of the register_taxonomy() function, it doesn’t even really make sense for this function to include sort/orderby parameters. Such parameters would be relevant to listing taxonomy terms, not to registering the … Read more

Proper way to update the slug of a taxonomy using register_taxonomy? [duplicate]

register_taxonomy triggers the action registered_taxonomy immediately after it’s registered, which gives you the arguments it was registered with. As long as the taxonomy key doesn’t change, you can hook that action, modify the arguments, then re-register it. function wpd_update_taxonomy_args( $taxonomy, $object_type, $args ){ if( ‘plugin_tax’ == $taxonomy ){ // remove this action so we don’t … Read more