I want to select and view posts that are related to same-type posts. From this thread: https://toolset.com/forums/topic/related-posts-5/ I learn this is not possible by using relationships. I do not want to rely on taxonomies as suggested in the referred thread but I want to do the selection manually, ideally in a similar way as in case of relationships between different CPTs. Is there a relatively easy way to do this?
No, I have not set up a same type post relationship yet. That is exactly what I'm struggling with.
To make it more specific, I want to create links between instances of the standard WP Post type to guide visitors to "Related Topics". I've done so in the past with Yuzo, but I expect I could do this with Toolset as well.
I've no problem setting up up relationships between different post types. But if I try to make a many-to-many relationship and select "posts" as the first posttype, it is disabled for selecting as second posttype. See the screenshot. If find the same for other relationship types and CPTs.
To create a same post type relationship you will need to enable the hierarchical attribute in your post type settings. Go to Toolset -> Post Types and edit your post type. The hierarchical settings should be under the Options tab.
I've tried to do so. However, this option seems to be unavailable for the standard WP Post type, only for CPTs. As mentioned, my use case is about the standard WP Posts. Nevertheless, for learning purposes, I've set it for a CPT, and have enabled Page Attributes for this CPT. I don't see any new option appearing, so what would be next? I'm curious how adding hierarchy would help me, as I do not see any logical hierarchy between the posts that I want to link (they would link mutually).
But if this is not going to work for the built-in WP post type, what are other options to achieve a list related posts? I can imagine adding extra fields to posts where I can manually enter Post IDs and create a view using these IDs. Not very user friendly, but perhaps it would be usable. Would that work? Any other route?
For the Default post types it is not possible. This type of relationship will only possible on Custom Post types and the Default Pages for wordpress.
Once you've enabled the "hierarchical" option you will then need to enable the "Page Attributes" option in the "Sections to display when edit..."
When you've done this you will get the Page Attribute section in the sidebar of the Edit page for your post where you will be able to assign your parent post.
Thanks, I understand what you mean. However, I'm afraid this does not solve my requirement. As I understand it, this workaround allows me to create one-to-many relationships: one parent post with many child-posts. But the posts I want to refer to, could be referred to by several posts. So I need a many-to-many relationship functionality.
The only possible way out I see is, as a mentioned earlier in this thread, to add extra fields to posts in which I manually add the Post IDs I want to refer to and create a view for them. Not elegant, but perhaps doable. Would this indeed the best approach? Other suggestions?
Unfortunately, no this won't be possible with any of the default mechanisms or wordpress or our Toolset plugins and many to many relationships are only possible through Multi Post Types and not a single post type relating to itself.
As you mentioned you will definitely need to do this manually by populating a custom field with the ID of the parent data. I would suggest using a single line field and use comma separated ID's when you are entering them into the field.