This weekend I was determined to create a custom post type (CPT) for my wine website. My initial plan was to create the CPT as a plugin, since that’s what Greg recommended. It turns out that’s a little more complicated than I thought it was when we went over the concept at 9:15 p.m. last Tuesday. I browsed the Codex for a refresher and did many Google searches, but unfortunately I couldn’t figure it out. So I moved on to plan B and placed the CPT code into my functions.php file. Once that step was complete, I connected to my local server and checked my WordPress admin panel. It was a miracle…my new “Wine” CPT button was added right below the comments button.
This was a great accomplishment, but having the CPT only display on my local admin won’t do me any good in the future when I want to add content. So I decided to commit/sync and drag my updated functions.php file into Cyberduck in an effort to get my CPT to show up on my web admin panel – piece of cake, right?
Wrong. After Cyberduck was finished downloading, I refreshed my website… and screamed because the screen turned white with a fatal error message. This was the first time I received an error message of this magnitude, so I was freaking out. But instead of throwing my laptop across the room, I deleted the functions.php file from Cyberduck, and that apparently fixed the problem. But, I’m still without the CPT on my web admin menu.
Sidenote: I found this handy “Common WordPress Error” resource page in the Codex, which I will now be bookmarking.
I want to revisit plan A – creating the CPT as a plugin – but I plan on doing some additional research before experimenting again on my site. For now, I will continue making style changes in the css and gathering content that I plan on incorporating.
I have to admit, I was a little skeptical about learning command line. Isn’t clicking easier than typing? But after actually going through the motions in class and browsing the readings, I understand why command line could be very useful in some situations. In my job, I often have to convert image files to different formats. Sure, clicking a button or two to convert one image is definitely faster. But, what about 1,500 images… in a short period of time? Typing a command that’s a few lines long would be much more efficient.