In case you use some of our Pro themes which support ‘Classes’ and ‘Trainers’ as a custom types (such as tGymm, tKidd, tSport, or tYoga), you may want to change the name ‘Class’ with something different i.e. ‘Practice’, or the ‘Trainer’ name. It will require a small code change. Here are all of the necessary steps:
- Login to your website Admin Panel
- Navigate to Left Menu -> Appearance -> Editor
- Open functions.php fileand rename the code marked in bold with other word:3.1. functions.php change the words marked in Bold:
$labels = array(
‘name’ => __( ‘Classes‘, ’tishonator’ ),
‘singular_name’ => __( ‘Class‘, ’tishonator’ ),
‘add_new’ => __( ‘Add New’, ’tishonator’ ),
‘add_new_item’ => __( ‘Add New Class‘, ’tishonator’ ),
‘edit_item’ => __( ‘Edit Class‘, ’tishonator’ ),
‘new_item’ => __( ‘New Class‘, ’tishonator’ ),
‘view_item’ => __( ‘View Class‘, ’tishonator’ ),
‘search_items’ => __( ‘Search Classes‘, ’tishonator’ ),
‘not_found’ => __( ‘No Classes found’, ’tishonator’ ),
‘not_found_in_trash’ => __( ‘No Classes found in Trash’, ’tishonator’ ),
‘parent_item_colon’ => __( ‘Parent Class:’, ’tishonator’ ),
‘menu_name’ => __( ‘Classes’, ’tishonator’ ),
);3.2. functions.php:
add_meta_box( ‘class_metabox’, ‘Class Information’, ’tishonator_add_class_fields’, ‘class’ );
3.3. functions.php
$labels = array(
‘name’ => __( ‘Trainers‘, ’tishonator’ ),
‘singular_name’ => __( ‘Trainer‘, ’tishonator’ ),
‘add_new’ => __( ‘Add New’, ’tishonator’ ),
‘add_new_item’ => __( ‘Add New Trainer‘, ’tishonator’ ),
‘edit_item’ => __( ‘Edit Trainer‘, ’tishonator’ ),
‘new_item’ => __( ‘New Trainer‘, ’tishonator’ ),
‘view_item’ => __( ‘View Trainer‘, ’tishonator’ ),
‘search_items’ => __( ‘Search Trainers‘, ’tishonator’ ),
‘not_found’ => __( ‘No Trainers found’, ’tishonator’ ),
‘not_found_in_trash’ => __( ‘No Trainers found in Trash’, ’tishonator’ ),
‘parent_item_colon’ => __( ‘Parent Trainer:’, ’tishonator’ ),
‘menu_name’ => __( ‘Trainers‘, ’tishonator’ ),
); - Open single-class.php, then update the following values marked in bold:
<?php esc_html_e(‘Class Schedule‘, ’tishonator’); ?>
<h3><?php esc_html_e(‘Trainer‘, ’tishonator’); ?></h3>
- Save changes and refresh the Admin page in browser. Then instead of class in Left menu, you will see the new word (just like the screenshot above).