How to prevent teacher from publishing course ?

How to prevent teacher from publishing course ?

By default theme will allow teachers to add and publish courses. If you want your teachers not to publish the course and make them to submit for review to admin for publishing, do the following.

  • Navigate to your site folder in server / wp-content / plugins / designthemes-core-features / open functions.php file.
  • Here you can find the following set of codes approximately on line number 14,

    $result = add_role( ‘teacher’, __( ‘Teacher’, ‘dt_themes’ ), array( ‘read’ => true, ‘edit_posts’ => true, ‘publish_posts’ => true, ‘edit_published_posts’ => true, ‘delete_posts’ => true, ‘delete_published_posts’ => true, ‘upload_files’ => true, ) );

    change this to

    $result = add_role( ‘teacher’, __( ‘Teacher’, ‘dt_themes’ ), array( ‘read’ => true, ‘edit_posts’ => true, ‘publish_posts’ => false, ‘edit_published_posts’ => true, ‘delete_posts’ => true, ‘delete_published_posts’ => true, ‘upload_files’ => true, ) );

  • After doing the above changes just navigate to your site backend (Dashboard), so that above changes will take effect.
  • Now remove this script remove_role(‘teacher’); as it is temporary, just to allow changes to take effect.

Leave A Comment?

The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.