Tag Archives: child theme

Deja Vu

So for this past week, amidst everything coming to the end of the semester, I have been completing the setup and installation on my new laptop. At first, things were going swimmingly — I was downloading everything I needed on my computer to pickup where we had left off for the WordPress final project site.

I did this by scouring the class syllabus and schedule to make sure that I had everything in order. However, some of this setup we had completed in class (which was wonderful) and I had minimal to no memory of what specific files to download or link or create databases for. I ended up Googling solutions and instructions for step-by-step setup and was feeling pretty abysmal until I read that MAMP is inclusive of phpMyAdmin and Apache (duh). So I spent a great deal of time exhausting a search of how to download these things that were already taken care of, it was relieving but frustrating.

When setting up my WordPress development environment, I was posed with the same problem I encountered when Laura was substituting — my child theme was not appearing. I redid the entire process about four times. I did read that there is a “Going Live” set of instructions via Smashing Magazine and I think that this will serve as a solution to my confusion. At this point I needed a break from continual failure and will try this tomorrow and move forward by starting on some CSS I plan to implement.

I have been rewatching the video from Laura regarding child themes and the reading list plugin, and by doing so I am starting to find a little bit of clarity (yay) as this projects comes to an end. For some reason there was a disconnect in my understanding as to how GitHub and WordPress related to one another for the project, but now I realize that it is just being used to document my progress as I complete it. Anyways, heres to finishing strong and sorry for the multiple emails, Professor Greg.

WordPress and PHP

For this week’s assignments when we were going over WordPress more in depth and touching back on our previous lessons regarding PHP, I felt confident at first. However, that quickly waned as I realized that it was true, everything is getting harder as the semester progresses on. I will add that I was personally unable to attend the class session this week in class and reviewed the lecture with the substitute Laura via her shared video.

I followed along while watching the video as we reviewed the readings regarding making a child theme and felt successful initially, but for some reason I have yet to figure out, could not make my child theme from my folder via wp-content —> themes to appear on WordPress itself. I tried restarting the programs, my computer, WordPress, make sure I had no spelling errors, played around with the text on the lines and Google searched solutions to no avail. I spent more time on this than I’d like to admit but cut my loses after multiple hours. This is absolutely one reason why I wish I could have made it in-person this week. However, I did feel still relatively confident in my ability to figure out WordPress — because I appears very user-friendly and more simple than it could be.

Regarding the PHP assignment this week to make five PHP features and commit them to GitHub, I literally have no idea what I am doing and feel like I have lost my mind. Initially I was unsure of where to actually write PHP — WordPress, GitHub homepage or gallery assignment? So I settled on GitHub, the first homepage attempt from weeks prior. I didn’t see my text change colors to recognize functions and command in Sublime text, which was unsettling. I watch numerous YouTube videos and Google searched how to include PHP an reviewed the lessons on learn-php.org again. I read online somewhere while Googling that GitHub only hosts static material and doesn’t read PHP or similar code. So here I am confused and will try to make sense of it in-person tomorrow, apologies.

Website theme development

This week’s readings on theme development and parent/child themes was good. In the past when I’ve used WordPress themes, they were usually the pre-made ones. I’m really interested in learning more for the most customization ability possible. (As for plugins, I’ve only dabbled in them in the past.)

Having the formats laid out in the post themes section was helpful. I already knew about galleries, quotes, images, video and link options. But the aside function is new to me from a programming/developer perspective. And within the suggested styling section of that same page, I actually think I found what I previously was curious about doing (per my final project idea rundown). It says a chat option is available. I wasn’t sure if this was the same style that customer service friendly pages have (with automated responses queued for simple questions and more specific questions sent directly to on-call staffers). But if it is, I’m definitely interested in pursuing this for added functionality.

I’ll also be revisiting some of I believe week 4’s lessons on scripting zoom-in function for images after the cursor hovers over them. And customizing my navigation bar is something I’m looking forward to, considering I’ve only been able to use the limited settings from pre-made themes in the past.

I also am grateful for the post types to be neatly arranged in the section on this topic. I have something to reference for my boiler plate, as opposed to pulling them together at the end and forgetting the other page options apart from the basic index.html, JavaScript and CSS pages. I know from the start to create a page for each and organize them accordingly.

And it’s finally time to write up my developer profile. I’ve already got the content from my interview and I can finish writing it this week. I was fortunate to have a great subject, who is currently employed with Facebook.

Custom Post Metaboxes and Styling My Site

I spent most of this week working on creating a custom metabox and custom fields for my site. As I mentioned in last week’s post, I created a custom post type plugin to log all of my runs. I was able to create a custom metabox called “run details” with three fields — neighborhood, date, and time. However, I’ve been unable to get the data that I enter into the custom fields to save and echo out to my post type. I even rewrote my custom post type plugin according to the reading list example Greg showed us, but haven’t been able to get the data to save. So I now have two versions of the same plugin written in different code, but both have the same issue. I spent more than five hours troubleshooting this on Friday night, but to no avail. For now, I’ve moved onto styling my child theme in CSS. I did figure out how to get my custom posts to show up on my homepage, which was one of the questions I had last week.

I played around with adding this Strava plugin to my site, but the reviews for this plugin mentioned that it is not mobile-friendly. I confirmed this fact when I downloaded and installed the plugin, created a test post using the suggested shortcode, transferred the files to my live site using FileZilla, and then pulled up that specific post on my phone. The reviews were (sadly) correct — the table showing the data about my run bled out of the area of my post, and looked really bad. Because there are very few Strava plugins out there, and because this flawed plugin was the highest-rated and most often downloaded one, I decided to instead use the shortcode provided by Strava to insert a text widget into the main sidebar of my site. I did this on my local site to see how it would look, and then went ahead and added the text widget to my live site. I know this doesn’t count as a code modification, but having my Strava account linked in some way to my site was a very important part of my project. Perhaps the addition of this widget can count under the “content” grading criteria instead.

I’m likely going to have to abandon my plans to create a lightbox photo gallery due to the fact that I’m running out of time to work on this project, but I’m still hoping to build a featured post carousel onto the homepage of my site. I’ll also be writing some content so that I can have at least five posts on my live site.

I’ve been loading my plugin and theme files onto my live site via FileZilla. It’s so exciting to see my changes show up on my live site. I did have a minor snafu when using the FTP server the other night. Something happened when I was replacing my CSS file, and when I refreshed my live site, all of my styles had disappeared and my site was showing up in Times New Roman with bulleted lists. I may or may not have cried for a few minutes. I had to delete my child theme files from the remote server and then re-upload them using FileZilla, and that fixed the issue. Crisis averted. I’m hoping not to have any more scares like this before the August 6 project due date!

Final Project Recap

As the deadline for our final projects drew close I have to say I had mixed emotions about my site and the progress I had made. On the one hand, I did not complete one of the customizations I set out to achieve. No matter how many articles I read, plugins I studied, tutorials I followed, or videos I watched, I could not get my slideshow plugin to function properly. This caused frustration, disappointment, and left me feeling quite defeated.

On the flip-side, however, as I sat there wracking my brains for ways to fix the plugin, I realized I had learned more than I ever thought possible in a 10 week window as relates to web development and coding. I knew how to check the connection between my local files and FileZilla to ensure things were transferring properly; I figured out how to create a Site Manager connection that automatically logged me into my page each time I opened FileZilla; I learned to understand the error messages that popped up on both my local and live site – what do these messages actually mean and what do I need to do to solve the problems; I figured out how to create a child theme and get it to work properly; I created a functioning form that emailed data to my personal email; I knew how to download Plugins and get them working; I was comfortable with all aspects of WordPress and site layout, from posts, to pages, and categories, to media, and pretty much anything in between; I figured out when something wasn’t work how to check for bugs in my software and, although I have yet to fix the code, I have identified that my slideshow plugin is somehow impacting the ‘featured image’ section of my posts, making it impossible for me to link photographs to the slideshow; and lastly, although I did not fix the problem, I was able to read tutorials and understand the basics of what they were saying, whereas at the beginning of this class I truly felt as though I was reading a different language.

I think, in retrospect, I may have bitten off a bit more than I could chew with trying to create a customized slideshow plugin that would connect to each of my posts as this involves so many different and complex (at least complex for me) pieces of code. Nevertheless, I can say without a doubt I gave this project my all – I spent hours upon hours over the past month reading, practicing, researching, and occasionally screaming at my computer and I am proud of all that I have accomplished and learned through this course.

Project Management and Creating My Child Theme

The video about agile project management best practices was very timely as I begin working on my final project site. I completed a certificate in project management through the School of Continuing Studies back in 2015 and am familiar with most of the terminology and concepts that were covered in the video and in Greg’s lecture, but I found it helpful to revisit these concepts and think about how to apply project management principles to my final project site. I imagine that the ability to be agile and flexible will be important as I work on my site, knowing there will be some obstacles along the way that I’ll have to work to overcome. The concepts of sprints and iterations might be a good way to approach all of the code I’m going to be writing — breaking the work that needs to be done down into more manageable chunks and keeping to a defined schedule of coding over the next three weeks before the project due date. I’m hoping that devoting six or seven hours a week to working on my site will be enough! I also want to be careful not to try to do more than I had originally planned for and outlined in my pitch post, as this could result in me getting distracted from completing the customizations that are most important to me.

As I read through the Agile Manifesto, it reminded me of the Zen of Python, which was one of the first reading assignments for this class. Both the Agile Manifesto and the Zen of Python espouse the importance of simplicity when working on a project. In terms of my final project, a simple solution can make my site more accessible and user friendly for my readers, which is something that the article about design thinking suggests is critical to creating a well designed, customer-focused site. As that article explains, design isn’t just about making things look pretty, but is also about creating the best and most fluid user experience. Design is something that should be thought about from the beginning, and not simply as an afterthought at the end of the project.

I also started some early work on my final project site this weekend. I purchased my domain and hosting on GoDaddy last week, and after several attempts of uninstalling and reinstalling WordPress on my hosting, I think my site is officially up and running at The Running (G)lover. I followed these instructions to install WordPress on my hosting, and I’m hoping that I did it correctly. I had initially installed WordPress on the https:// version of my domain, but it was very easy to uninstall and then reinstall it to the http:// version instead.

I downloaded the Retina theme from WordPress and have been poking around in the code to see what it looks like and how I will alter it using CSS and my other modifications. My most exciting achievement this week was creating my child theme using the instructions on the WordPress Codex. The process was pretty straightforward due to WordPress kindly providing all of the code to use, but I was definitely confused when reading through some parts of the instructions. For example, the instructions mention that “if your child theme has more than one .css file (e.g., ie.css, style.css, main.css), then you will have to make sure to maintain all of the Parent Theme dependencies,” but it is unclear what this means. There are no follow-up instructions for what to do if your parent theme has multiple .css files. My chosen theme has a main style.css file, but also has a separate subfolder called CSS that contains .css files called bootstrap.css, editor-style.css, and font-awesome.css. I’m not sure if I am also supposed to enqueue these three files in addition to the main style.css file, and if so, I have no idea where to start with doing this. I enqueued only the main style.css file, and my child theme did indeed show up in my local site’s administration panel and I activated it, so I am praying that I did this correctly. Greg and fellow classmates, have any of you encountered a similar issue when creating your child theme, and if so, what did you do?

Now the real work (and fun, hopefully) begins…