add_action( 'init', function(){
global $wp_taxonomies;
$labels = & $wp_taxonomies['category']->labels;
$labels->name = 'Author';
$labels->singular_name = 'Author';
$labels->add_new = 'Add Author';
$labels->add_new_item = 'Add Author';
$labels->edit_item = 'Edit Author';
$labels->new_item = 'Author';
$labels->view_item = 'View Author';
$labels->search_items = 'Search Authors';
$labels->not_found = 'No Authors found';
$labels->not_found_in_trash = 'No Authors found in Trash';
$labels->all_items = 'All Authors';
$labels->menu_name = 'Author';
$labels->name_admin_bar = 'Author';
// Если хотите вывести все параметры, которые можно изменить, используйте var_dump
// var_dump($labels);
} );
function mynew_product_categories( $args = array() ) {
$parentid = 0;
$args = array(
'parent' => $parentid
);
$terms = get_terms( 'product_cat', $args );
if ( $terms ) {
echo '<ul class="hsa-nav__items">';
foreach ( $terms as $term ) {
echo '<li>';
echo '<a href="' . esc_url( get_term_link( $term ) ) . '" class="' . $term->slug . '">';
echo $term->name;
echo '</a>';
echo '</li>';
}
echo '</ul>';
}
}
function mynew_product_subcategories( $args = array() ) {
$parentid = get_queried_object_id();
$args = array(
'parent' => $parentid
);
$terms = get_terms( 'product_cat', $args );
if ( $terms ) {
echo '<nav class="internal-nav">';
echo '<ul class="has-drag">';
foreach ( $terms as $term ) {
echo '<li>';
echo '<a href="' . esc_url( get_term_link( $term ) ) . '" class="' . $term->slug . '">';
echo $term->name;
echo '</a>';
echo '</li>';
}
echo '</ul>';
echo '</nav>';
}
}