Skip Navigation

[Resolved] Relationship does not appear

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

Problem:

How to connect WordPress users with other post types?

Solution:

The workflow should like these:

1) User register and login into your website

2) Show him "my account" page,

3) In this my account page, display a view block:

- Query "Member" posts

- Filter by post author is same as logged in user

- If there isn't any result found, show him a post form for creating "Member" post

- If found a result, show the "Member" post information

4) In the single "Member" post, display a post form for creating "registraties" post, in this post form display the post type relationship field

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/

This support ticket is created 3 years, 9 months 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)

This topic contains 18 replies, has 2 voices.

Last updated by matthiasV-2 3 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1932817

I can install your database dump file in my localhost.

I think there are some misunderstandings:
Q1) the relationship "registraties" "verkopers" does not show in custom fields for the user form "Nieuwe gebruiker registreren DEF" and "Profiel gebruiker aanpassen DEF"

The Toolset post types relationship is for post types, you can not use it between posts and users.
In this case, you need to consider other workaround, for example:
1) create another post type "Members", each "Members" post author is different WordPress user, one WP user can have only one "Members" post
2) Setup post type relationship between "Members" and "registraties"("verkopers")
So you will be able to connect WP users with different post types.

See our document:
https://toolset.com/course-lesson/what-are-post-relationships-and-how-they-work/

Q2) the relationship "provincies steden" does not show in custom fields for the post form "Eigendom toevoegen", "Eigendom aanpassen" and "Eigendom verwijderen"

Please check those three post forms you mentioned above:
- "Eigendom toevoegen", this one is for creating "Eigendommen", but relationship "provincies steden" is for connecting "Provincies" and "Steden" posts, it is expected result, you will not see relationship "provincies steden" in post form "Eigendom toevoegen"

You will only see the "Eigendom toevoegen" relationship when it is a post form for creating child "steden" posts

- "Eigendom aanpassen" and "Eigendom verwijderen", same problem as above.

In your case, I suggest you try these:
Create a page, display a view block with custom search form:
- Query "steden" posts
- Filter by parent "provincies" post
https://toolset.com/course-lesson/creating-a-custom-search/
- In view's loop, display a link for creating grand-child "Eigendommen" post form, see our document:
https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/

#1932893

1) I added a new post type "gebruikers" (WP users) and setup a one-to-one post type relationship between "gebruikers" and "registraties". Although the one-to-one post type relationship still doesn't show up in the user forms "Nieuwe gebruiker registreren DEF" and "Profiel gebruiker aanpassen DEF". So I cannot add the relationship that if a new user makes a registration he can select himself as a user and link the user and the registration together.

2) I don't understand what you mean. Maybe you can create something visually so that I can re-create easily.

#1932895

Q1) You can not use post type relationships in Toolset user form.
Tool post type relationships is for posts, it works only in post form.
The workflow should like these:
1) User register and login into your website
2) Show him "my account" page,
3) In this my account page, display a view block:
- Query "Member" posts
- Filter by post author is same as logged in user
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/
- If there isn't any result found, show him a post form for creating "Member" post
- If found a result, show the "Member" post information
4) In the single "Member" post, display a post form for creating "registraties" post, in this post form display the post type relationship field

Hope it is clear

Q2) In order to create something visually, I need your permission to do some changes in your website, thanks

#1933323

My issue is resolved now.