Okay
  Public Ticket #2228165
Change url service
Closed

Comments

  •  1
    visaoativa started the conversation

    I need to do the services URL translation. What is the right way?

    Attached files:  Captura de Tela 2019-11-27 às 23.21.40.png

  •  1,283
    Bryan replied

    Hello

    You can add this code to functions.php of child theme to do it:

    add_filter( 'insight_core_service_slug', 'tractor_child_change_service_slug' );
    function tractor_child_change_service_slug() {
        return 'courses';
    }
    

    After do it, please go to Settings > permalinks > select Post Name type and resave it to apply.

    Thanks

  •  1
    visaoativa replied

    PERFECT !!!

    But, breadcrumb ?

    Attached files:  Captura de Tela 2019-11-30 às 15.47.56.png

  •  1,283
    Bryan replied

    Hello

    You can try this code to change it:

    add_filter('insight_core_register_post_type_service', 'tractor_child_register_post_type_service');
    function tractor_child_register_post_type_service($info) {
        $info['labels'] = array(
            'name'                  => esc_html__( 'Courses', 'healsoul' ),
            'singular_name'         => esc_html__( 'Course', 'healsoul' ),
            'all_items'             => esc_html__( 'All Courses', 'healsoul' ),
            'menu_name'             => _x( 'Courses', 'Admin menu name', 'healsoul' ),
            'add_new'               => esc_html__( 'Add New', 'healsoul' ),
            'add_new_item'          => esc_html__( 'Add new course', 'healsoul' ),
            'edit'                  => esc_html__( 'Edit', 'healsoul' ),
            'edit_item'             => esc_html__( 'Edit course', 'healsoul' ),
            'new_item'              => esc_html__( 'New course', 'healsoul' ),
            'view'                  => esc_html__( 'View course', 'healsoul' ),
            'view_item'             => esc_html__( 'View course', 'healsoul' ),
            'search_items'          => esc_html__( 'Search courses', 'healsoul' ),
            'not_found'             => esc_html__( 'No courses found', 'healsoul' ),
            'not_found_in_trash'    => esc_html__( 'No courses found in trash', 'healsoul' ),
            'parent'                => esc_html__( 'Parent course', 'healsoul' ),
            'featured_image'        => esc_html__( 'Course image', 'healsoul' ),
            'set_featured_image'    => esc_html__( 'Set course image', 'healsoul' ),
            'remove_featured_image' => esc_html__( 'Remove course image', 'healsoul' ),
            'use_featured_image'    => esc_html__( 'Use as course image', 'healsoul' ),
            'uploaded_to_this_item' => esc_html__( 'Uploaded to this course', 'healsoul' ),
            'filter_items_list'     => esc_html__( 'Filter courses', 'healsoul' ),
            'items_list_navigation' => esc_html__( 'Courses navigation', 'healsoul' ),
            'items_list'            => esc_html__( 'Course list', 'healsoul' ),
        );
        return $info;
    }
    

    or using Loco Translate plugin to change that text for theme or Insight Core plugin.

    How to translate the theme

    Thanks