Skip Navigation

[Résolu] Append Parent Category to a Post Relationship Drop-Down Menu Items

This support ticket is created Il y a 6 années et 10 mois. 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 réponses, has 2 voix.

Last updated by Christian Cox Il y a 6 années et 10 mois.

Assisted by: Christian Cox.

Auteur
Publications
#539310
dropdownmenu-append.jpg

I have a problem where a State is being selected in a Post Relationship drop-down, then there's another drop-down menu for Counties. Since there are counties from multiple states, there are multiple counties with the same name. I recently asked to see if it was possible to make the Counties drop-down menu only show the counties that are children of the previously selected States drop-down, but the responder said it wasn't a feature. So, if it was possible to just append a parent category post-title to the end of a child post-title in the drop-down menu's within the Post Relationship area of Post.php, I believe that would solve my issue well enough that the correct county would be easy to find. So instead of the county drop-down just saying "Scott County", it would say something like "Scott County : Kentucky" after its parent was appended.

#539325

I see, it would be nice to be able to filter the titles of each option programmatically. I recall from another ticket that this will be tricky, and unfortunately there's no filter to modify these labels. I'll recommend it to our developers as a feature request, but I can't guarantee it will be implemented. This sounds like something one of our partner contractors could knock out for you. You can find their contact information here:
https://toolset.com/consultant/

Another option I can think of is to create your Videos from the County editor instead of Videos > Add New. Add enough data to a new Video here so that you can find it in Videos > All items, then finish filling in all the Video information in the Video editor. It's not exactly straightforward, but it might save you a few steps in your workflow and wouldn't require hiring another developer resource.

#539647

Will you please point me to the file that creates the drop-down menu for the Post Relationship drop-down? I'll see if I can figure out something.

#539744

I would begin here:
/wp-content/plugins/types/library/toolset/types/embedded/includes/post-relationship.php
::wpcf_pr_admin_post_meta_box_output

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.