Skip Navigation

[Resolved] Initial setup of Post Types and Custom Fields and Spreadsheet importing

This support ticket is created 3 years, 1 month 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 22 replies, has 3 voices.

Last updated by PeterB6457 3 years ago.

Assisted by: Shane.

Author
Posts
#1996615

Hi, I don't seem to be able to import my spreadsheet into Toolset so if I may I would like some advice please.
I have created the following in localhost

Post Types
Post Type - Moving Vessels| Custom Fields - Large or Small Front Strop Rear Strop Hole Position
Post Type - Skippers | Custom Fields - First Name Last Name Member Number Phone Mobile Email
Post Type - Vessels Data |Custom Fields - Vessel Class Draft mtrs Keel Type LOA feet Beam mtrs Displacement kgs Mooring Row

I am no expert but I want club members to be able to search for 1.Their vessel data 2. Their Personal information (Skipper) and 3. Moving vessels information. I guess they can all be related some how. Could you advise if what I am doing is correct as I don't want to have to input all the data manually again if I get it wrong and can't use the spreadsheet import.
I thought I could just create .csv file from excel and import it but it seems not without spending alot of money which is a shame?

Like many clubs people have ways of working that aren't up to date, I am trying to set a demo site up to show what can be done with the data I have.

Also can you confirm if I set this all up on a domain I can then use the 'All in One WP Migration' plugin to move things to my clubs servers if it all works.

What are to options to export the data held in Toolset?

I hope you don't mind me asking all this, I will move what I have done onto a live domain which may help explain things.
Many thanks
Peter

#1996883

Hello, if you have a site setup in localhost and everything is working as you'd like, you can use Toolset's Types Export/Import feature to export all your Toolset Types structures and import them in another site. By structures I mean:
- Your custom post types
- Your custom field definitions
- Your custom taxonomy definitions
- Your post relationship definitions
Structures does not mean:
- Posts or post content
- Custom field contents or values for posts
- Custom taxonomy terms or terms applied to each post
- The relationships established between existing posts
Those things would be exported with WordPress's export / import tool, or with a separate CSV plugin.
But if you want to export and import both things, in essence if you want to migrate the entire site exactly as it exists in one environment, then a plugin like All-in-One WP Migration is ideal. It's fully compatible with Toolset, and we use it regularly here in support to copy clients' sites into local environments for testing purposes. The site's data structures and data content are both migrated to the new environment without any additional code or database manipulation required. In 99% of cases I've used AIOWP MIgration, it just "works" out of the box.

I thought I could just create .csv file from excel and import it but it seems not without spending alot of money which is a shame?
It depends on what you're trying to import. If you're trying to create Types fields by importing from a CSV, that's not supported, those must be created from the wp-admin side. However, if you're trying to import content into existing Types fields by importing posts and custom field values, several tools are available. Some of the free ones cover most of the features needed for a basic site. Depending on the complexity of your data, you might be able to get by with a free one. It won't have the bells and whistles of the paid ones, but it might be functional. Hard to say at this point without understanding more about your site.

I am no expert but I want club members to be able to search for 1.Their vessel data 2. Their Personal information (Skipper) and 3. Moving vessels information. I guess they can all be related some how. Could you advise if what I am doing is correct as I don't want to have to input all the data manually again if I get it wrong and can't use the spreadsheet import.
I'm not really following this. It sounds like you're asking me to tell you if you're doing everything correctly, but there's not much detailed explanation of what it is you want to accomplish or what you have done so far. It's probably best to set up the desired relationships, data structures, and custom searches in a live sandbox site where I can take a closer look before I can tell you if you're doing things correctly during data collection, export/import, etc. or not. I'd rather not guess about what you might want to achieve and what you might need for those features to work correctly.

I'm activating private reply fields here where you can share login credentials for a sandbox site. We can collaborate there if you provide a login for me.

#2000901

Hi Christian
I am confused, I have looked at several videos and not really getting to the point where I can add data and view it.
On the Sandbox I have created 4 Post types - Mooring Position, Moving Vessels, Skippers and Vessel Data. I have also created the custom Fields for the Post Types. I tried to create a template but it didn’t show the data I typed in for 2 boats.

Could you please give me a little guidance so I can move forward, I have looked at several videos but I’m obviously missing something, yes I’m getting on in years and my brain is getting slower but I am determined to crack it!

I’m not sure how I should relate the post types, or if I have over complicated things. When launching a vessel members will want to look at the Vessel Data and Moving Vessels, they will also want to look up the skipper details. It seems when set up the system could email them the details. The Moorings Position is separate. Do you think I have set the Post types correctly?
I tried to create a form so I could input data, the end result didn’t show the data for the vessels MARE LUTRA and AGILITI? I want to create a form so I can type in all the data by selecting the form fields I made. I’m not sure if what I have created in Moving Vessels checkboxes is correct – value to store? I assume the Selected setting of ‘Yes’ is correct?
Once I have a working form and added say 15 boats I assume I do a search to see the data added.
Also if you look at Vessel Data all I see is CRED Auto draft as well, I looked this up but the answer it will disappear in 8 hours seems odd and it didn’t.
I certainly can see the potential of Toolset and thinking I should update to 3 sites so I can play on a live dummy site having copied the servernetworks.uk to another domain.
I look forward to your replay, many thanks
Peter

#2001121

I tried to create a template but it didn’t show the data I typed in for 2 boats.
Right, the template was empty. Let's walk through it. I see a Vessel Data post created here:
hidden link

I see you have assigned a Content Template to this Vessel Data post. The Content Template was empty here:
hidden link

That's why the post appeared empty on the front-end of the site here:
hidden link

If you want to display custom field values from the Vessel Data post on the front-end of the site, you must add those fields to the Content Template using the Blocks Editor. Nothing is automatically displayed on a Content Template, it must be inserted manually in the editor. I have added a Single Field Block to the Content Template for you, and set the field to use a Dynamic Source. I have chosen to display the value from the Vessel custom field.

Now I see "MARE LUTRA" on the front-end when I visit this post, as expected. So you can continue adding custom fields to this template to display information from the Vessel Data post on the front-end of the site.

Also if you look at Vessel Data all I see is CRED Auto draft as well, I looked this up but the answer it will disappear in 8 hours seems odd and it didn’t.
I see you have removed the Post Title field from the Form that creates new Vessel Data posts here:
hidden link

Since no post title is created when the Form is submitted, the generic automatic title is applied to the post. Typically, I would expect to see the post title field in the Form, and that's where the post title would be stored. It looks like instead of using the post title field you are using the Vessel custom field to hold the Vessel name. I think that custom field is redundant. You should use the post title standard field instead to hold the Vessel name. The post will be referenced throughout wp-admin using the post title field, so it's intuitive to use that field to hold the Vessel name. I would replace the post title field in the Form and use that field to hold the Vessel name. I would delete the Vessel custom field from the Vessel Data field group.

I tried to create a template but it didn’t show the data I typed in for 2 boats....Do you think I have set the Post types correctly?
I don't really understand the concepts involved here. I'm not sure I understand why Moving Vessels and Vessel Data are separate post types, and why they represent different concepts. Could you explain? You mentioned you entered data for 2 boats. I only see 1 post in the Vessel Data post type. So that indicates to me that Vessel Data corresponds to boats. One Vessel Data post equals one Boat? What is one Moving Vessel, and how is it related to one boat?

#2002253

Hi Christian
Thank you for your reply, it seems I have much to learn but I am determined. Are you able to delete the sandbox so I have a clean start? Your last point regarding the Vessel Data and Moving vessels made me realise they should be in a single post type. Moving Vessels is basically information required apart from the actual boat details. Boats are launched and recovered from the river over the sailing season and the operators of the equipment need to know how they are moved, there are about 120 boats and we can’t rely on the owners to remember everything!
I will create a new Post type called Vessels and put things together including Mooring details, it seems the sensible way to do it, I stress I am no expert. What I have now realised, and I hope I’m correct, is Blocks, (views), can be set up so only certain information is displayed.
I have just purchased the 3 site option as I can be a little more flexible with things at this time.
Hopefully you can give me a clean start and I will get on with it. Please don’t close this ticket yet as I’m sure I will be asking other questions, assuming you are ok with this.
Thanks very much
Peter

#2004437

Hi Christian
Thanks very much I appreciate it. As it happens I have downloaded the GYM layout to localhost and it has helped. I am at the point where I am trying to figure out how best to create the Post Type/ Custom fields, I have quite a lot Custom fields in the one Post Type I have created and I’m not if it's the best way to do it. I don’t want to add data and then find I have to start again!
I will put a list together, explain them and perhaps you may be able to point if it is the correct way of putting things together before I go too far.
Thanks gain for your help, Peter

#2004529

UPDATE Hi again
Hopefully this might explain what I am trying to put together

(Member Details) - First Name, Last Name, Phone, Mobile, Email
(Boat Details) –
Vessel Name, Make, Draft mtrs, Keel 4 types, Length feet, Width mtrs, Weight kgs, Mooring Row, Mooring Number
(Equipment details choice used to move and Launch Boat each boat) –
Site Trailer, Road Trailer and
LARGE Travel Hoist- Front Strop – Long or Short, Rear Strop – Long or Short, Strop Hole Number
SMALL Travel Hoist - Front Strop – Long or Short, Rear Strop – Long or Short
(Winter Storage)
Location – Cat Field, Sea Wall, Small Hedge, Main Field,
How Boat is stored – Ground, Trailer, Cradle

About 15 Members are Tractor Drivers so I will want to produce a list of these people.

I understand if this advice is out of your remit but hopefully you can give me some hints as to how I should put this lot together, basically should I separate them or keep them all in one post type. I’m not sure about Taxonomies but maybe it could be used to list/connect the tractor drivers?
Thanks again Cristian, Peter

#2004535

That is reasonable, and arguably part of the sandbox "learn-by-doing" process. I'll stand by for your update. I'd like to mention that some of the data organization decisions depend on how you'd like to be able to search and filter posts using those criteria. When you create custom search Views that provide front-end filter and sorting controls, it is only possible to sort and filter by the fields and taxonomy terms applied to the post type you want to display in the results. It is not possible to sort or filter using criteria in related posts, for example, though information from related posts can be included in the results. So when deciding where to place certain custom fields and taxonomies, it is important to consider how you want to allow people to search for posts using those filter criteria.

#2004573

Looks like we were both writing replies around the same time. At first glance, it looks like you have information about boats, and you have some information about members. So that leads me to suggest you have at least two custom post types: Boats and Members.

It looks like you have some custom criteria that apply to each boat, a few custom criteria that apply to each member, and you need to decide whether to make those criteria custom fields or custom taxonomies. In general, you should use taxonomies to group posts by some shared theme or concept. You should use custom fields to add metadata specific to each entry. A site about automobiles might include a custom taxonomy "Style" with terms like "Sporty", "Great Value", "Family Oriented", "Antique", "Muscle Car", "Utility", and so on. On the other hand, a custom field for the number of engine cylinders makes more sense. Some of this decision is arbitrary, and the differentiation is not always clear.

In my opinion, the Member criteria should be included as custom fields on the Member post type. You might also consider a checkbox for designating a Member as also being a Tractor Driver, rather than a taxonomy. Unless you plan to create other Member types and include taxonomy terms for each of those types, a custom taxonomy holding just a single term doesn't really make sense in my opinion. That sounds more like a custom field applied to each member.

Almost everything else you have listed above makes sense to include as custom fields on the Boat post type, with the exception maybe of "Make". It might make sense to create a custom taxonomy for Make to group boats by manufacturer if that's what you mean by Make. Especially if you'd like to have archives of boats organized by manufacturer, since taxonomy terms get automatic archives generated by WordPress.

Technically, taxonomy-based searches are faster than custom field searches, so if you have tens of thousands of posts with lots of different criteria, you might consider taxonomies more performant in custom searches. However, because of how WordPress queries work, you cannot order query results by a taxonomy term. You can order query results by custom field values. Taxonomies have automatic post archives, meaning WordPress will automatically generate a list of posts associated with each term at a designated archive URL. Custom fields do not get categorized archives automatically.

#2008535

Hi Chistian, thanks for your info, I'm going through one heck of a learning curve!
I have created a Form to input data most of which is a Single Line, Number or checkbox. However I have run into an issue where I have to setup a condition so the Post template shows the correct information.
A single choice has to be made between LARGE Hoist, SMALL Hoist, SITE Trailer, ROAD Trailer.
If LARGE Hoist is selected I want the template to show Front Strop Size (Long or Short) and Rear Strop size (Long or Short) together with a Hole Position for the Front strop.
If SMALL Hoist is selected I want the post template to show Front and Rear Strop Sizes only.
If SITE Trailer or ROAD Trailer is selected the Template just needs to indicate which one is selected.
I have setup multi checkboxes so for example Front Strop size (Long or short can be selected, at the moment I can select both check boxes, I assume I can make it so only one of the two check boxes can be selected. I guess by now you can tell I don’t know much about conditional setups.
Hope you can help, thanks, Peter

#2009861

I have setup multi checkboxes so for example Front Strop size (Long or short can be selected, at the moment I can select both check boxes, I assume I can make it so only one of the two check boxes can be selected.
If you want to enforce a requirement that only one of multiple options can be selected, a field type "radio" or "select" is preferred to checkboxes. Checkbox groups will always allow multiple selections, unless you add custom programming.
So it sounds like you need one field with 4 options that allows for one single selection - LARGE Hoist, SMALL Hoist, SITE Trailer, or ROAD Trailer. That should be a radio or a select field type.
You need one field Front Strop Size with 2 options that allows for one single selection - Long or Short. That should be radio or select.
You need one field Rear Strop Size with 2 options that allows for one single selection - Long or Short. That should be radio or select.
You need one field Hole Position for Front Strop. I'm not sure based on the information I have here what field type would be best.

Then in the template, you need three conditional blocks.
- One conditional block that tests the value of the first field, and displays the front and rear stop size fields, as well as the hole position field, if "LARGE Hoist" is selected.
- One conditional block that tests the value of the first field, and displays the front and rear stop size fields if "SMALL Hoist" is selected.
- One conditional block that tests the value of the first field, and displays the selected value if "SITE Trailer" or "ROAD Trailer" is selected.

#2010775

Great, thank you Christian.
I will set it up on an external server and see how I get on. Could you please leave this ticket open a little longer.
Thanks, Peter

#2010781

Understood - I will stand by here for an update.

#2012513

Hi Christian
I am sorry but I really am having trouble with setting up the conditions you mention. I looked at some videos etc but I don't understand the conditional block operators and I can't find a list of explanation's.
Can I push my luck and ask you to login to the following domain as administrator and look at what I have done so far.
If you could give me an example I may be able to do the rest. (its a demo site so it's not live to the club if you take my point.)

I have set up 3 Post types Antifouls (Not using at the moment) Skippers and Vessel Information
The post form is 'Create Vessel Information' The Page for the Form is 'Create Vessel Info' and the Template is ' Template for Vessels Information 1' ( Once I get my head around all this I will rebuild it to tidy things up.
On the Template I have just been trying things out the MOVING METHOD you will see is what I did originally it is not conditional so will have to be deleted.
I have decided to only show the strop requirements for the LARGE HOIST and the Hole number ( only the Front Stop needs the Hole number)
I need to put the Skippers Name on this template I haven't looked into how to do this but I guess this is where the Relational info is setup on the Skippers Post type so I can display the name on the Vessel Information template.

While you are on this demo site could I ask you to look at the Home page , I am wondering if I create A Dumper Driver Taxonomy in the Skippers Post Type am I able to put a short code in the drop down display 'Equipment Operators'.
I really appreciate your help with this I don't think I am too far from getting this sorted out.
Thank you very much for all your help, Peter

#2013095

UPDATE
I have worked out the MOVING METHOD selection the rest STROPS HOLE etc. I have yet to work out.
Thanks

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