Skip Navigation

[Resolved] Beta Types/Relationships API – Intermediate Post types – 2nd Class Citizens????

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

Problem:

In the latest beta version of Types plugin, there is new many-to-many relationship, I am asking for / hoping for the titles of the intermediary post types to either:

A) Be accessible in the metabox when adding a relationship to posts

B) Auto generate using the parent post titles and not their post Ids

Solution:

Q1) Be accessible in the metabox when adding a relationship to posts

There isn't such a feature within Types Beta version. Currently, you can try this:
When you edit a single parent post, you can use the button "Connect existing XXX", see our document:

https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/

screenshot:
https://cdn.toolset.com/wp-content/uploads/2018/02/toolset-post-relationships-example-departures-arrivals.jpg
button "Connect existing Flight"

Q2) Auto generate using the parent post titles and not their post Ids

At the moment, we don't support that in the GUI in a very nice way, but I think we can open that to debate
and the client should be already able to use the toolset_build_intermediary_post_title filter:

/**
         * toolset_build_intermediary_post_title
         *
         * Allow for overriding the post title of an intermediary post.
         *
         * @param string $post_title Post title default value.
         * @param string $relationship_slug
         * @param int $parent_id
         * @param int $child_id

Relevant Documentation:

https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/

This support ticket is created 6 years, 8 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 15 replies, has 2 voices.

Last updated by Geoffrey Cleverley 6 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#625811

Hey Luo


For the feature reuqest:
In posts connected by one-to-many (or many-to-many but not urgen) relationships, in the relationship metabox, provide access to the connected posts other relationships.

I think it will handles most of problems in this thread, I forward it to Minesh, and our developers will evaluate it, thanks for your input

You are correct.

With the filter provided to solve the intermediary problem, that really is my main concern.

A few words on the filter. It works like a charm. My new intermediaries are now perfectly formed and searchable in the WP-Admin. I have another question regarding that, but will start a new ticket.

Thanks again

Jeff