0

i am working on some project where i have custom post types for management courses.

I have create new roles (for users) : teacher and student.

Now the quasions is what is the right way to assign one user with teacher role and for example 25 students to one custom post type (course).

I want to see/add teacher and students in the custom post type (course)

Thanks

1
  • If students and teachers can only have 1 course, you can put the course id in a user meta for both
    – mmm
    Commented Mar 17, 2016 at 7:50

1 Answer 1

0

Now your outline is pretty brief, so I'll make a guess at what you're trying to accomplish.

My approach would be to use the Advanced Custom Fields plugin with the repeater field add-on (you'll have to pay a small amount for that) and attach a repeater field to your courses custom post type. The repeater field is where you would place your student data...something like a user ID, name, etc. ACF gives you a "user" field where you can select existing users, and this could be how your instructors add students to a class.

If you give your instructor custom role limited access to the backend they will be able to manage the courses and assign the students and you won't have to build a user interface for that. Even so, there will be several tricky details to get the UI right, this will only sketch in the outlines of what you will need to do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.