How to change the title of the head of the category without changing the category name?

changed so ,but at the same time changed in two places
/* Meta field to product categories */
add_action("product_cat_edit_form_fields", 'mayak_meta_product_cat');
mayak_meta_product_cat function($term){
 <tr class="form-field">
 <th scope="row" valign="top"><label>Header (title)</label></th>
 <input type="text" name="mayak[title]" value="<?php echo esc_attr( get_term_meta( $term->term_id, 'title', 1 ) ) ?>"><br />
 <p class="description">No more than 60 characters, including spaces</p>
<code lang="php">
/* Output title for categories of items */
add_filter('single_term_title', 'mayak_filter_single_cat_title', 10, 1);
add_filter( 'single_term_title', 'mayak_poduct_cat_title', 10, 1);
mayak_filter_single_cat_title function() {
 $pci = get_queried_object()->term_id;
 return get_term_meta ($pci, 'title', true);
mayak_poduct_cat_title function($pct){
 $pct = get_queried_object()->name;
 return $pct;

April 7th 20 at 11:03
0 answer

Find more questions by tags WordPress