Skip Navigation

[Closed] How to apply custom fields and post types from metabox to toolset?

This support ticket is created 2 years, 10 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.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 2 years, 10 months ago.

Author
Posts
#2291353

Tell us what you are trying to do?
Hi I make a affiliate site for my client. Previously, I made a post type and a custom field in a plugin called metabox.
The data in that metabox is not properly linked to the toolset. Please tell me how to link metabox post type, custom post type, and taxonomy.

Is there any documentation that you are following?
No

Is there a similar example that we can see?
No

What is the link to your site?
hidden link

#2291783

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I'm not familiar with metabox.

If you create custom post types with Toolset, it is just the same as creating them using the core WP API (i.e. register_post_type).

If you deactivate code (or a plugin) that previously registered a post type but the posts still exist in wp_posts, then if you register the same post type with Toolset (i.e. you use the same slug to register the post type, the other settings can vary) then you would find the existing posts of that type available to edit.

You would have a similar result with custom taxonomies.

Where you will find a difference is with custom fields. The first difference relates to the field slug. With Toolset if you register a custom field with the slug of, say, "priority", then this is actually stored in wp_postmeta with a key prefixed by "wpcf-", i.e. "wpcf-priority".

So existing posts with custom fields created using some other solution are unlikely to have this prefix, and so won't be recognised by Toolset.

The other problem could be for more complex fields that store data as something other than a string (e.g. a checkboxes field), where Toolset (or the other solution) may use a proprietary format to store the data, so that even if they were using the same slug so that the data was recognised, it may not be understood.

For the first part of the problem you can create a custom field group (at Toolset > Custom Fields) and then bring existing fields under Types control, using the Post Field Control button. That way you can avoid recreating the fields from scratch (assuming there are posts with these fields saved in the database).

The topic ‘[Closed] How to apply custom fields and post types from metabox to toolset?’ is closed to new replies.