Skip Navigation

[Resolved] Generate a meaningful unique ID

This support ticket is created 2 years, 11 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: Africa/Casablanca (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by martink-8 2 years, 11 months ago.

Assisted by: Jamal.


Tell us what you are trying to do?
I want to create a unique field will be auto-generated that uniquely identifies a post in products post type.In my example I have two post types,an establishment and a product.I created have a one to many post relationahip where by an establishment can have many products. I Want to use the post title of the establishemt(parent) and combine it with another value(may be post_id of products post type) to create a new unique value that will be used as the post title for products post type.



Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting Toolset support.

You can use the toolset_association_created hook and update the product post title. The action will provide the IDs of both posts(establishment and product) so you can get the title of the establishment and update the title of the product.

I hope this helps. Let me know if you have any questions.


please Elaborate further how I'm am going to use the toolset_association_created in the back-end and front-end forms?



Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Well, custom code can be added on the theme's functions.php file, on a separate plugin, or in a Toolset custom code snippet. Check the following articles:

I assume that you are not familiar with programming, right? If yes, I'll help you with this task. I'll need more details on how you are adding Establishments and Products. Are you using the backend? Or are you using Toolset Forms? Would you allow me temporary access to check this closely? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

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