Skip Navigation

[Résolu] How to assign the same post to all user

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: The main issue that I can't get my head around is this.

I will create one course post with only one set of chapters for one course.

Users will not be the author of this post so how can I assign this same post to all users who sign up to my website as seperate posts so i can begin to work on how to capture each user's progress.

Solution: In my reply to your previous ticket, I talked about assigning a post to a user by making the user the author of that post. A post has only ONE author, so we can't assign a post to multiple users using the author field.

What we can do instead, is creating another custom post type, let's call it "Subscription" or "Enrollment", this post will be linked to the "Course" or the "Chapter" custom post type using a One-to-many relationship, and make the user the post's author. This way, a "Course" or "Chapter" will have multiple "Subscription" posts linked to it. Each "Subscription" post will have an enrolled user as the author.

On the "Course" or "Chapter" post page, we'll use a view that will query "Subscription" posts linked to this "Course" or "Chapter" that are created by the current user. If the user has already an existing post, we will use this post to track to progress. If the user does not have any posts, we can offer him a Toolset Form(may have only the submit button) to let the user enroll in this course/chapter by creating the "Subscription" post. Does it make sense?

Please note that Toolset relationships are only between two custom post types, so we can't have a relationship between Course, Chapter, and Subscription. We can only have it between a Course and a Subscription, or a Chapter and a subscription.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 réponses, has 2 voix.

Last updated by jamesH-3 Il y a 11 mois.

Assigned support staff: Jamal.

Auteur
Publications
#1843433

Hi Jamal

Thanks for your response to my previous enquiry

The main issue that I can't get my head around is this.

I will create one course post with only one set of chapters for one course.

Users will not be the author of this post so how can I assign this same post to all users who sign up to my website as seperate posts so i can begin to work on how to capture each user's progress.

Thanks

#1844321

Jamal
Supporter

Languages: Anglais (English ) Français (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

In my reply to your previous ticket, I talked about assigning a post to a user by making the user the author of that post. A post has only ONE author, so we can't assign a post to multiple users using the author field.

What we can do instead, is creating another custom post type, let's call it "Subscription" or "Enrollment", this post will be linked to the "Course" or the "Chapter" custom post type using a One-to-many relationship, and make the user the post's author. This way, a "Course" or "Chapter" will have multiple "Subscription" posts linked to it. Each "Subscription" post will have an enrolled user as the author.

On the "Course" or "Chapter" post page, we'll use a view that will query "Subscription" posts linked to this "Course" or "Chapter" that are created by the current user. If the user has already an existing post, we will use this post to track to progress. If the user does not have any posts, we can offer him a Toolset Form(may have only the submit button) to let the user enroll in this course/chapter by creating the "Subscription" post. Does it make sense?

Please note that Toolset relationships are only between two custom post types, so we can't have a relationship between Course, Chapter, and Subscription. We can only have it between a Course and a Subscription, or a Chapter and a subscription.

I hope this helps. Let me know if you have any questions.

#1860343

Thanks Jamal