Change Courses to Sessions

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29304
    Celeste Grupman
    Participant

    Hello, I’d like to change Courses to Sessions, I’d like to change Faculty to Speakers and Departments to Schedules

    Is there a way to accomplish this?

    #29340
    Veena
    Moderator

    As i said earlier you need to modify the function function mo_register_course_post_type() which is in framework/presentation/custom-post-types.php (line no:101)
    Pls redefine the same function in your child theme’s function.php file by doing so your modifications are preserved from future theme updates.

    function mo_register_course_post_type() {
    
            $labels = array(
                'name' => _x("Courses", 'post type general name', 'mo_theme'),
                'singular_name' => _x("Course", "post type singular name", 'mo_theme'),
                'menu_name' => _x('Courses', 'post type menu name', 'mo_theme'),
                'add_new' => _x("Add New", "course item", 'mo_theme'),
                'add_new_item' => __("Add New Course", 'mo_theme'),
                'edit_item' => __("Edit Course", 'mo_theme'),
                'new_item' => __("New Course", 'mo_theme'),
                'view_item' => __("View Course", 'mo_theme'),
                'search_items' => __("Search Courses", 'mo_theme'),
                'not_found' => __("No Courses Found", 'mo_theme'),
                'not_found_in_trash' => __("No Courses Found in Trash", 'mo_theme'),
                'parent_item_colon' => ''
            );
    
            register_post_type('course', array(
                'labels' => $labels,
                'public' => true,
                'publicly_queryable' => true,
                'show_ui' => true,
                'exclude_from_search' => false,
                'query_var' => true,
                'rewrite' => array( 'slug' => 'course' ),
                'capability_type' => 'post',
                'taxonomies' => array('course_category'),
                'has_archive' => false,
                'hierarchical' => false,
                'supports' => array(
                    'title',
                    'editor',
                    'excerpt',
                    'thumbnail',
                    'page-attributes'
                )
            ));
    

    you can change the menu name by changing ‘menu_name’ and for changing permalink you have to change rewrite slug

    'rewrite' => array( 'slug' => 'course' ),
    

    And you will need to visit Settings->Permalinks once for the slug change to take effect.
    likewise you need to change the custom post type function for faculty and departments.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Invent Theme Support’ is closed to new topics and replies.