Skip Navigation

[Resolved] Custom field in Permalink

This support ticket is created 4 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 1 reply, has 2 voices.

Last updated by Christian Cox 4 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#1360763

Hello,

I would like to include custom field (e.g. my-field) in URL of my custom post type. So it would look like hidden link . How can I achieve this?

#1360943

Hi, Toolset doesn't provide this type of custom permalink structure. Our structures adhere to WordPress standards for custom posts, like post-type-slug/post-type. You would need a custom code solution here or a 3rd-party plugin to adjust the permalink structure to include a custom field. I will be glad to provide any Toolset-specific information you need to facilitate that implementation. I can show you how to get the value of a custom field from the database, for example:

types_render_field( "my-singlelinetext", array( ) );

Or using get_post_meta:

get_post_meta( 12345, "wpcf-my-singlelinetext", true); 

More information about the types_render_field API is available here: https://toolset.com/documentation/customizing-sites-using-php/functions/

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