Hi there,
I have two custom post types: a course and a section. There is a one-to-many relationship between them.
When I create the relationship in the WordPress interface, I click "Connect Existing Section," and in the dialogue that pops up, I can enter the title of the course that I want to connect to the section.
Here's my question: can I enter a different field value in that dialogue? For example, in my course custom post, I have a custom field named "course number." In the "Connect Existing Section" dialogue, it would be great if I could enter the course number or the course title in the search field. Is this possible?
Saul
Well, yes, the fields are there when you add the new posts that relate to the currently edited, by default.
You cannot remove them actually, so it is surprising you do not see those.
For example, I have a Field "Number" on the Post Type "posts" and connected that to the "Pages" Post Type.
The screenshot above shows, that the number field is editable when I add a new related post.
Also, when I add an existing or when I edit a relation (but of course only after I connected it)
Or maybe you mean the Select2 that lets you search connected posts?
That is not possible to alter (it will be the post title always)
But there is an internal usability issue filed that asks to allow also to show other values (maybe post ID) when choosing the related posts.
I can add a voice there if this is the issue we talk about!
Beda,
Thanks for your reply.
I was asking about the "Select2" that lets me search connected posts. I would like to add my voice to the internal usability issue that lets you show another field such as the Post ID. Ideally, the fields that 1) match the search and 2) appear in the menu list of matches would be user-configurable.
Thanks!
Saul