Skip Navigation

[Resolved] How To: Save custom posts to user accounts

This thread is resolved. Here is a description of the problem and solution.

Problem:

I want to let users select a custom post and save it. Like adding a product to a cart, only they're simply saving posts to their profile.

Solution:

I suggest you try to create a custom post type, and connect it with your posts, for example:

https://toolset.com/forums/topic/how-to-save-custom-posts-to-user-accounts/#post-1158540

Relevant Documentation:

https://toolset.com/documentation/post-relationships/

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Author
Posts
#1158481

Hi,

I want to let users select a custom post and save it. Like adding a product to a cart, only they're simply saving posts to their profile.

#1158540

Hello,

There isn't such a built-in feature within Toolset, in you case, I suggest you try to create a custom post type, and connect it with your posts, for example:

1) Create a custom post type, for example "my-favorite-posts", each "my-favorite-posts" post's author is different user.

2) Setup many-to-many between post type "my-favorite-posts" and your custom post type
https://toolset.com/documentation/post-relationships/

3) Setup relationship form to connect the "my-favorite-posts" post with other posts
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/

4) After user login, redirect him to a wordpress page, display a post view:
- query "my-favorite-posts" post
- filter by post's author is current logged-in user
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/#post-author-is-the-same-as-the-logged-in-user
- in view's loop, display a child post view,

5) Child postview,
- query posts of your custom post type
- filter by the post type relationship between post type "my-favorite-posts" and your custom post type
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items
and display the custom post type information

#1159101

My issue is resolved now. Thank you!

#1159106

You are welcome