Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jota1981

    (@jota1981)

    I found a solution in that post that seems to work:

    Go to modify Tutor LMS core file: \wp-content\plugins\tutor\classes\Post_types.php:120

    Change this code

    ‘rewrite’ => array( ‘slug’ => ‘course-category’ ),

    to

    ‘rewrite’ => array( ‘slug’ => ‘categoria-cursos’ ),`

    And very important, disable and then enable the plugin to apply the changes.

    • This reply was modified 3 years, 6 months ago by jota1981.
    • This reply was modified 3 years, 6 months ago by jota1981.
    Plugin Support Md. Jobayer Al Mahmud

    (@jobayertuser)

    Hello @jota1981

    To change course slug paste this code in your theme function.php

    add_filter( 'register_post_type_args', 'wpcourse_register_post_type_args', 10, 2 );
    function wpcourse_register_post_type_args( $args, $post_type ) {
    
    if ( 'courses' === $post_type ) {
    $args['rewrite']['slug'] = 'corsi'; //here add your new slug
    }
    
    return $args;
    }
    

    Then go to wp-admin > settings > permalinks > hit the save change again.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘change course-category slug’ is closed to new replies.