• Resolved tbiondi

    (@tbiondi)


    I’ve created a course as the admin and want to change the Author to another user. I’ve attempted to change the author in the course builder and it defaults back to the admin user. It will not change. Thanks in advance for your help.

Viewing 1 replies (of 1 total)
  • Plugin Support Ashfiqur Rahman Anim

    (@anim07)

    As Tutor LMS has no built-in primary/main author change option, you will need to do some tweaks to change the primary/main author for the courses that are created.

    First of all, you will need to disable Gutenberg author support for sometime from Tutor LMS plugin. Before you start, make sure you are working on a child theme.

    Now, go to this path wp-content/plugins/tutor/classes/Course.php on line no 40, you will see the code that enables Gutenberg author support for “Courses” custom post type.

    // add_filter(‘wp_insert_post_data’, array($this, ‘tutor_add_gutenberg_author’), ’99’, 2);

    Comment that line, because it’s better to activate that code again after changing the author.

    Then place this piece of code block in your child theme’s functions.php file

    function tutor_primary_author() {
    if ( function_exists(‘tutor’)) {
    $tutor_post_type = tutor()->course_post_type;
    add_post_type_support( $tutor_post_type, ‘author’ );
    }
    }
    add_action(‘init’, ‘tutor_primary_author’, 999 );
    After that, you will find the option to change the instructor from the course quick edit view or from the backend editor. . But make sure you are logged in an Administrator account.

    Watch the video below to check how it is done.

    After changing the author successfully, you can now remove the comment from the line no 40 at Course.php file in Tutor LMS core plugin.

Viewing 1 replies (of 1 total)

The topic ‘Change Authors’ is closed to new replies.