Skip Navigation

[Resolved] Custom field and sug

This support ticket is created 5 years, 7 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
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 20 replies, has 2 voices.

Last updated by stephaneB-5 5 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#1276593

Yes, manipulating a post slug with custom field values is possible with custom code. You said you want to manipulate the value of the custom field. That's completely different, so I was confused. Thanks for the clarification 🙂

#1277145

I'm sorry !
Indeed, I want to put in the slug of the woocommerce product the values of the custom field "functionalities" in order to have the following slug: "value1-value2-value3-...-slug".

How do I proceed?

Thank you Christian

#1277493

Again, it's possible with custom code. There is a hook called "save_post" in WordPress that you can use to manipulate post slugs when the post is created or updated. There are examples available here: https://codex.wordpress.org/Plugin_API/Action_Reference/save_post

Here is the PHP documentation for string manipulation:
https://www.php.net/manual/en/ref.strings.php

I can see we are going in circles here, so let me try to be very clear. You must write your own custom code to finish this. I cannot write it for you. You must figure it out yourself, or hire a contractor to produce this code for you. It's not simple to do what you want effectively, and the custom solution is not offered to you by Toolset or the support staff. Sorry if that sounds blunt but I want to be very clear about what our support staff will do for you. We will not create custom code solutions, per our support policy, and what you are asking for is a custom code solution: https://toolset.com/toolset-support-policy/

If there is a Toolset-specific API you need assistance with, I can help with that.

#1277517

ok but how can I get the values from the "functionalities" custom field?

#1277597

Check the example and documentation I mentioned earlier:
https://toolset.com/forums/topic/custom-field-and-sug/#post-1275783

#1277641

My issue is resolved now. Thank you!