How to import Excel xls to pages & content?
i am working on this project for a tuning site with all cars with models and engine types (pages) and how much power is added before and after tuning (content)
you can see an example here in picture below ill explain what i am looking for as best as possible.
1. The make (page)
2. The Model (page)
3. The Year (Page)
4. The engine type + Power added (page & final content)
This is the final result i am looking for , i have this excel xls file as you can see the layout in this screenshot . al cells are plain text so i think easy to import.
Now my big question is , is it easy to make this kind of thing with a good plugin or do you guys have any suggestions , you know there are alot of cars so it would be almost insane to put them in manualy make pages for them one by one , if there is an easier way if there are no plugins please tell me.
Thanks for the help beforehand.
Possible Answers to Your Question:
First let me prepare you that this is a major undertaking and will require a lot of prep work both on the file and in WordPress which is outside the scope of what Layers does for your site.
Unfortunately there is no support for CSV importing within WordPress itself so you must use a plugin like this one:
Be sure to go through their documentation to understand how to prepare the columns and headings in your document:
Now with regard to that data and what fields they need to match for WordPress, the bigger question is how you need this content organized in WordPress and whether it needs to generate its own archives. If I understand what you are trying to do, you have several makes of auto, each with several models. Each model has several tuning files that contain a standard power, upgraded power, standard torque ad upgraded torque value along with its normal content.
Using the content management tools WordPress gives us by default, you would need to do this with Posts, not pages, in order to take advantage of the hierarchal power of the category and tags.
Posts have the following major elements:
These can translate like this:
- Tuning file title, ie Tuning file BMW 1 serie
- The page content, including the green checkmark list
- The car make and model, ie BMW > BMW 1 Serie
- The year value ie F20 – 2011
Because you are not using a standard Year value here, tags make it easier to generate archives on a custom value like this that is used on multiple models that are not necessarily the same make.
The first tier of your categories should be the Make of car, ie BMW, Citroen etc
The next is the models ie BMW 1M would be a sub-category of BMW
Make > Model
or BMW > BMW M1, BMW > M2 and so on
You will end up with this Category structure in WordPress, more or less:
This allows WordPress to automatically generate archives for BMW which display all tuning files for BMW, or specifically BMW M1, It also generates archives for each tag, so you can see a list of all tuning files for F20 -2011 and so on. Now to get these archives to display on the front-end in the styles you have there require either a plugin like ShortCodes Ultimate that can output custom post lists using a shortcode (which you can then put inside a toggle in a page if you want) or a child theme with custom category and tag archives that you design like the above.
Where it gets really complicated is your power and torque values. The best way to manage those is with custom fields. If you want to stay away from a lot of PHP programming in a child theme, you can use the Advanced Custom Fields plugin to create these four text fields and add them to Posts.
You get to choose the field name, so you could create standard_power, upgraded_power, standard_torque and upgraded_torque. Then you would map the values of those columns to these fields in the importer plugin.
To output them on the front end, ACF provides super-simple template tags you can use, so all you have to do is design the table, and add a variable in the loop that grabs the field value for the given post on that row.
For in-depth help with construcing the child theme, pleasecheck out the Theming Guide under Developer Resources in our main menu here. Further info on category and tag templates can be found here:
The WordPress Support community is a great resource for getting help with custom queries and template building: