I'm trying to convert some existing post types that a previous developer created using 'Cuztom', which has all its own set of individual php files that control the custom posts. I've been following the directions of:
The first section of re-creating all the custom posts in Toolset worked great, however the section for recreating the custom fields isn't working as none of the field details appear in Post Field Control. I'ts also not an option for me to recreate the fields manually as there are hundreds of posts with multiple fields which would take an eternity.
The fields seem to be generated via the functions.php file loading 'Nona-custom-posts-and-meta.php' which then contails all the details and slugs for the custom fields.
I've attached an example of what the fields look like if it helps at all, but unfortunately i'm working on the website offline so i cant provide a link to the backend.
Thanks for getting back, how would you like me to send it? Also, do you want just the relevant file or would you like the other accompanying ones like cuztom.php and functions.php etc.
What I really need is the relevant file that generates the custom fields. You can additionally just send the theme since this is what contains the field information.
You can upload the theme to google drive and then send the share link to me.
Thanks for looking into it, i felt like that might've been the case. However, I assume the fields created in the theme just pull the relevant stuff from the database via slugs? If such is the case, would it not be possible to remake the fields in Toolset and then pull the data in by using the same details?
I'm not averse at all to recreating the fields, they aren't too complex, and i'd obviously like to use Toolset for as much as possible because there's a lot more resources/help available, the only main thing i'm trying to avoid is having to input all the data manually again as the amount of individual posts would be too overwhelming. Is something like this possible instead rather?
If you recreate the fields then the slugs will be different. Toolset will add a wpcf- prefix to the fields so they won't be referencing your original custom fields.
What I can do for you is to check with our 2nd tier supporters on monday to see if it is actually possible to convert these fields.
If we re-create the fields then it is possible to use custom code to copy over the data into the new custom fields but I would like to check first.
After digging a bit further i think i may have found a workaround, but before i committed to buying the extra plugin i wanted to get your opinion. It seems i could use WP All Export to export the CSV data of the custom posts on the old theme (including their fields), and then re-import them onto the new theme using WP All Import. The plugin needs the pro version to add in custom fields, but just having a look at what data is actually there in the free version it seemed like the data was present, so i thought it might work.
Obviously the idea is to still then bring it under control of Toolset, so 'if' it did work, would the newly imported custom fields data then be able to be converted over to Toolset in the original way according to the guide i started out with?
This is one way to do it, because when you are importing the CSV files I believe the WP All Import plugin allows you to map the field data to specific custom fields.
Which means you should be able to Map your existing fields to the custom fields you've created in Types and it should populate the data through that means.
There is also another method that relies on some amount of custom code to copy over the custom field data from the existing fields to your types field.
What it would involve is that you write a shortcode that would loop through all the post and get their respective field data and then update the matching field that was created in Types.
Thanks for following up on this. Which method would you recommend personally? The purpose of migrating all this stuff over to Toolset for me was so that it would be in a format i understand and can fix should any bugs arise, so ideally i'd prefer to get rid of as much of the old format and 'cuztom' stuff as possible so that i understand how the website works and don't have stuff on the website that i'm unfamiliar with - where if it breaks i don't know how to fix it.
Given that though, between remapping the data or using custom code which do you think would be the best way to go about this?
Given the number of the fields that would be involved, it would be best if you go through with the Exporting as a CSV and then mapping the imports to the corresponding Types fields.
If it was less fields then the custom code method would be a better solution.