What should be the links or how to get a taxonomy-{erliche}-{arleen}.php?

Hello! In my theme there is a file category-articles.php where I deduce all the standard WP entry headings "article" and the category "news" deduce in a file category-news.php and access them I get the link get_category_link() passing it the ID of the category.
<a href="<?php echo get_category_link(4); ?>" class="link-title"><h1 class="section-title news-after">news</h1></a>
so I get the page where displays all records relating to the heading "news"

There is at me an arbitrary record type "Event" and to him the taxonomy tree of the type "action" which has the term "Charity" (label - offering) and "Other" (label - etc) 5e269bbc1227f584719546.jpeg
all records (not one record, and all) belonging to the category "Charity" I deduce that by using WP_Query in the file taxonomy-action-offering.php and the category "Other" in the file taxonomy-action-etc.php and get on them unlike the standard headings using bread crumbs (they are implemented I have here is so https://wp-kama.ru/id_541/samyie-hlebnyie-kroshki-... 5e26a179a5824655087206.jpeg

But the question is: how do I get on taxonomy-action-offering.php and taxonomy-action-etc.php using the Permalink? tried the same way as standard record types, i.e. through the link, but with another function get_term_link() passing it the ID of the custom category and throws me on the main.

Here is a shorter: on this file I get using the function get_category_link( category ID); 5e26d0040a0da770350318.jpeg but how to get these files 5e26d05deb183014085457.jpeg

registration code records and taxonomy
add_action( 'init', 'register_post_types' );
register_post_types function(){
 register_post_type('projects', array(
 'label' => null,
 'labels' => array(
 'name' => 'Event', // the main name for the record type.
 'singular_name' => 'Event', // name for one record of this type
 'add_new' => 'Add event', // to add a new record
 'add_new_item' => 'Add event', // title for the newly created entry in the admin panel.
 'edit_item' => 'Edit event', // to edit the record type
 'new_item' => 'New event', // text of the new entry
 'view_item' => 'Watch event', // for viewing the records of this type.
 'search_items' => 'Search event', // for search for these types of records
 'not_found' => 'Not found', // if the result of the search nothing was found
 'not_found_in_trash' => 'Not found in trash', // if not found in the recycle bin
 'parent_item_colon' => ", // for parents (in the tree types)
 'menu_name' => 'Event', // name of menu
 'description' => 'Charity event, event, holidays, oigusi, competition, quiz',
 'public' => true,
 'publicly_queryable' => true, // depends on public
 'exclude_from_search' => true, // depends on public
 'show_ui' => true, // depends on public
 'show_in_nav_menus' => true, // depends on public
 'show_in_menu' => true, // whether to show menu adminki
 'show_in_admin_bar' => true, // depends on show_in_menu
 'show_in_rest' => true, // add in the REST API. C WP 4.7
 'rest_base' => null, // $post_type. C WP 4.7
 'menu_position' => 4,
 'menu_icon' => 'dashicons-megaphone', 
 //'capability_type' => 'post',
 //'capabilities' => 'post', // an array of additional rights for this type of record
 //'map_meta_cap' => null, // Set to true to enable default handler for special rights
 'hierarchical' => false,
 'supports' => [ 'title', 'editor'], / / 'title','editor','author','thumbnail','excerpt','trackbacks','custom-fields','comments','revisions','page-attributes','post-formats'
 'taxonomies' => ['action'],
 'has_archive' => true,
 'rewrite' => true,
 'query_var' => true,
 ) );

// hook to register TAXONOMIE 
add_action( 'init', 'create_taxonomy' );
create_taxonomy function(){

 // list of parameters: wp-kama.ru/function/get_taxonomy_labels
 register_taxonomy( 'action', [ 'affairs' ], [ 
 'label' => ", // determined by the parameter $labels->name
 'labels' => [
 'name' => 'Action',
 'singular_name' => 'Mera',
 'search_items' => 'Search for a measure',
 'all_items' => 'All measures',
 'view_item' => 'View measure',
 'parent_item' => 'Parent measure',
 'parent_item_colon' => 'Parent measure:',
 'edit_item' => 'Izmeniti measure',
 'update_item' => 'Update measure',
 'add_new_item' => 'Add new measure',
 'new_item_name' => 'Name novaol action',
 'menu_name' => 'Action',
 'description' => 'all that spit event held by the mosque', // description of the taxonomy
 'public' => true,
 'publicly_queryable' => true, // equal to the argument public
 'show_in_nav_menus' => true, // equal to the argument public
 'show_ui' => true, // equal to the argument public
 'show_in_menu' => true, // equal to the show_ui argument
 'show_tagcloud' => true, // equal to the show_ui argument
 'show_in_quick_edit' => true, // equal to the show_ui argument
 'hierarchical' => true,

 'rewrite' => true,
 //'query_var' => $taxonomy, // the name of the query parameter
 'capabilities' => array(),
 'meta_box_cb' => true, // Metabox html. callback: `post_categories_meta_box` or `post_tags_meta_box`. false — Metabox disabled.
 'show_admin_column' => true, // auto-create column of fees in the table the associated record type. (since version 3.5)
 'show_in_rest' => true, // add in the REST API
 'rest_base' => null, // $taxonomy
 // '_builtin' => false,
 //'update_count_callback' => '_update_post_term_count',
 ] );

what else do you need to send email.
April 4th 20 at 13:09
1 answer
April 4th 20 at 13:11
Well, all SOLVED
get_term_link( $term, $taxonomy = " );
I pointed out only the first parameter is the id of the category, but we need another second to specify the name of the taxonomy

Find more questions by tags WordPress