contacts

(+359) 88 339 4445

Buy All 40 Premium WordPress Themes for $54.99
No Additional Fees, Pay Once and Use Unlimited Time for Unlimited Domains

How to Change ‘Class’ and ‘Trainer’ name?

How to Change ‘Class’ and ‘Trainer’ name?

In case you use some of our Premium themes which support ‘Classes’ as a custom types (such as tGymm, tKiddtSport, or tYoga), you may want to change the name ‘Class’ with something different i.e. ‘Practice’. It will require a small code change. Here are all of the necessary steps:

  1. Login to your website Admin Panel
  2. Navigate to Left Menu -> Appearance -> Editor
  3. Open functions.php file and 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’ );

  4. 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>
  5. 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).

Leave a Reply