This week, I spent entirely too much time time trying to get custom metabox data to save and echo to the body of my custom post type. We are talking hours and days here. On Wednesday night after class, I had a breakthrough, and found a block of code online that I modeled my custom post type plugin code after. I was able to get the data in my four custom fields (neighborhood, date, time, and distance) to save when I click publish on the post editor screen. However, I still can’t get the data to echo to my custom post despite playing around with the content.php, single.php, and content-single.php templates in my child theme. When playing around with these template files, I got the data to echo both above and below the post content, but not in the box that holds the post content itself. Very frustrating. I decided that simply saving this metadata is enough, since it’s more of a backend customization anyways and is used for my personal tracking purposes.
I also worked hard this week at creating content for my live site. The realization that I had to write several posts by Sunday was helpful in terms of holding me accountable to actually go running.
In last week’s blog post, Jane mentioned that she was using the projects feature in GitHub to track her progress, and I thought this was a great idea. I started using this feature and created a to-do list and completed modifications list, both of which I used to track my progress on my site customizations.
Speaking of site customizations, I updated my pitch post to remove the lightbox gallery modification that I had hoped to create, and I updated a few of my other modifications to reflect the fact that I ended up using existing WordPress plugins for those (Strava widget, contact form). I’m hoping that the modifications that I was able to complete — creating a child theme and customizing CSS styles (fonts, colors), creating a custom post type plugin with categories, rendering a custom meta box, and rendering four custom fields and saving the metadata — will be enough.
Overall, this was a productive week. I’m glad to be “done” with my site, and am looking forward to seeing everyone else’s projects on Wednesday.