This is the eleventh in a series of live lessons on using WordPress and Thesis as a Content Management System (CMS). We are using the CSV Importer plugin to import an existing database from a CSV file. The first step in doing this is to arrange the data in a way that the plugin can understand. In this lesson we configure the data so the plugin can import it.
Community Library Website – Case Study Part 2 – Create Custom Post Types
Community Library Website – Case Study Part 3 – Custom Post Type Configuration
Community Library Website – Case Study Part 4 – Custom Taxonomy Decisions – Theory
Community Library Website – Case Study Part 5 – Custom Taxonomy Decisions – Practical Application
Community Library Website – Case Study Part 6 – Incorporating Existing Data Into the Project
Community Library Website – Case Study Part 7 – Creating Hierarchical Custom Taxonomies
Community Library Website – Case Study Part 8 – Creating Non-Hierarchical Custom Taxonomies
Community Library Website – Case Study Part 9 – Creating Custom Post Meta
Community Library Website Case Study – Part 10a – Restore the Database Using BackupBuddy
Community Library Website Case Study- Part 10 – Creating Custom Post Meta – Continued
Community Library Website – Part 11 – Importing Existing Data to the Website
Community Library Website – Part 12 – Prepare Existing Data for import by the CSV Importer plugin
Community Library Website – Part 13 – Import Existing Data Using the CSV Importer Plugin
Community Library Website – Case Study Part 14 – Date in Permalink Configuration
Community Library Website – Part 15 – Importing Images
Community Library Website – Part 16b – Final Data Import
Community Library Website – Part 17 – Add Thesis Post Meta to Custom Post Type
Community Library Website – Part 18 – Add WordPress 3.0 Menus
Community Library Website – Part 19 – Add Post Meta and Taxonomy Information to the Post Display
Community Library – Part 20 – Add topics and audience to book display
Community Library – Part 21 – Display the Rest of the Post Meta in the Post
Community Library Website – Part 22, Create the Permalink Structure
Community Library – Part 23 – Remove Custom Post Meta from Post Display
Community Library Website – Part 24, Add Taxonomy and Post Meta Data to the Teaser
Community Library Website – Part 25, Add Taxonomy Data to the Teaser
Community Library Website – Part 26, Adjust the Teaser Styling Using Design Options
Community Library Website – Part 27, Styling the Teaser Using CSS
Community Library Website – Part 28 – Fine Tune the Teaser Display
Community Library Website – Part 29, Designing a Custom Catalog Page
Community Library Website – Part 30, Using a Query String in a URL
Community Library Website – Part 31, Adding Custom WordPress Menus
Community Library Website – Part 32, Add Custom Menus to the Catalog Page
Community Library Website – Part 33, Add Another Custom Menu to the Catalog Page
Community Library Website – Part 34, Troubleshooting Custom Menus
Community Library Website – Part 35, Add Styling to WordPress Menus
Community Library Website – Part 36, Add HTML Markup to WordPress Menus
Community Library Website – Part 37, Add WordPress Menus to Archive Pages
Community Library Website – Part 38, Add and Style a List of Tags
Community Library Website – Part 39, Add a Search Box to the Sidebar
Community Library Website – Part 40, Add Links to the Sidebar
Community Library Website – Part 41, Add Taxonomy Drill Down Browsing
Community Library Website – Part 42, Custom Loop to Display Custom Post Types
Community Library Website – Part 43, Simple Custom Query
Community Library Website – Part 44, Custom Taxonomy Query
Community Library Website – Part 45, Add Thesis HTML Structure to Teasers
Community Library Website – Part 46, Display Posts from the Last 60 Days
Community Library Website – Part 47, Custom Loop If Have Posts
Community Library Case Study – Part 48, Increase the Number of Posts that Display on the Custom Catalog
Community Library Website – Part 49 – Naming Conflicts in Custom Taxonomies
Community Library Website – Part 50 – Find and Replace Semi-colons in the Database
Community Library Website – Part 51 – Modify Taxonomy Names Directly in the Database
Community Library Website – Part 52 – Sort Posts by Meta Value
Community Library Website – Part 53 – Show the Term Label Only when a Term Exists
Community Library Website – Part 54 – Sort Archive Posts by Meta Value
Community Library Website – Part 55 – Add Sort Order to Custom Taxonomy
Rick: Okay so that brings us on to Part 11 of how to… well, Part 11 is going to be how to import data and Pam has given me an updated data list which has acquisition date, barcode, media, circulation time, audience, location, call number, ISBN, publication date, topics as 1, 2, 3… 3 potential topics, author, title, subtitle, and summary. And this is in an Excel spreadsheet.
Now, what we need to do here is first, we need to prepare the data. The 2nd thing we need to do is import the data and in order for us to import the data, we need a plugin. Now, I have tested several plugins yesterday and finally arrived at the plugin that I think we should be using for this. And this plugin is called CSV Importer. And so, that’s what you should search for… CSV importer and install that. And then once you’ve done that, you can open up CSV Importer over here and all you have to do with this is choose the file, upload it, import it and see what happens. Now, the problem with doing that is you’re going to have errors. And so, that’s why we have to work on the data and so in order for us to work on the data, I want to bring up their help file. And they have a little help file that you can see in the plugins editor. And if we come over to CSV Importer and select that, you’ve got this CSV Importer Read Me text and so… this is a great way… well, this gives you access I think to this… to information that you need because once this thing’s installed, what you have to do is use specific tags at the head of each of your columns depending upon what kind of element you’re using. And so for example, we have title. It’s really going to be the title of the post and so if we look back over here at the Read Me text, you can see that the title of the post should have CSV post title at the top of the column. So we’re going to copy that, come over to here and paste it… enable editing, pardon me. Come over here and paste it and now, that’s the name at the heading. Then we’ll have to do this same thing for post… CSV Post post, copy that, come back over here… that’s the summary… CSV Post post.
And the next thing it wants is a post type so it says CSV post type and in our case, the post type is a custom post type called catalog item. So we need to create that. We’ll come over here and insert a column… I guess it’ll automatically insert the column. Put that title at the top, CSV post type. Now we need to put the actual post type in here. So we come over to this for just a moment, come back down to Manage Post Types… open link and a new tab. This post type is called catalog items. So lower case, with a hyphen in between. So that’s what we’re going to use. Catalog items and now, we need to copy this across the entire database. It should take a moment. Okay, there we go. So now we have added catalog items to our database, for all of these things.
So now you’ve got our post type and let’s see, let’s look at our taxonomies while we’re at this. So Manage Taxonomies, we have a taxonomy called media type, location, topics, audience, and author. We’ll take the first one as… well, we’ll just…media type will be the first one we’ll put in and that’s here. Now if we go back and look at the directions, scroll down here to the bottom, you can see these got stuff about let’s see… about custom taxonomies. And you know, these directions aren’t as clear as you’d like them to be so I’m going to show you how they work. But the first taxonomy that we’re doing is, I believe, what did we say it was? It was hierarchical and it’s media type.
So a hierarchical media type starts off with… which was did it go? Okay, it starts off with CSV text. Come back over to this media, CSV text and then media. So that’s the name of the custom taxonomy. So CSV text media and then the same thing is true with circulation time, right? It’s… oh no, circulation time is not a… I’m sorry, I take that back. Circulation time is not a taxonomy but audience is a taxonomy. And so, we’re going to put CSV text and then lower case audience. And location is a taxonomy so we’ll paste CSV text small location. And Pam’s got her hand up. Yes, Pam?
Pam: I thought in your taxonomy, it was media-type. So that would need to be in the column head. Is that correct? In column D?
Rick: Well, if that’s correct, yes it will. Let’s see. Yeah, that’s what it is. Media type, you’re absolutely right. This is one of the reasons why it took me so long to get this right the first time. Okay, where do we go? Back to this… so this is media-type, okay. So then, let’s see…we are not going to change these ones yet but author, we are going to change. It’ll be CSV author and I think that’s it.
Okay and so then the next ones are… setting aside topics for a moment because we have to do some special preparation for the topics. But our next ones are the custom post meta. And so again, the custom post meta needs to be the correct name here so we’re going to come to meta boxes. And so we’ve got barcode, call_number, ISBN, publication_year, and circulation_time.
So let’s come back over here. Okay, we’re going to… this one actually is a custom post meta and we haven’t established it yet. So acquisition… I don’t even know if I can type anymore. Acquisition time or acquisition date actually… date and then barcode is just barcode. Circulation time is… if you see me misspell something, by all means, please remind me here. And let’s see, what was call number? It’s call_number. ISBN is ISBN. Let’s go back over to this custom taxonomy for a second. Publication year… you know, this is a little funky because actually, this is not in a year… this is actually in a date format. But publication_year… and then we come over here and we’re going to say subtitle. Okay so now we’ve got all of those fixed. Now what we have to do is some tricky…