Tag Archives: week7

Word Press and PHP Drama

This week I spent most of my time re-reading through the WordPress readings and thinking about what I should be doing for my final project. Because I hope to be able to build on what I create for the final project, I want to make sure that this is something I can keep up with and that the theme I choose has enough flexibility to fit different types of content (i.e. recipes, reviews, about me, etc.). What I was able to come up with you can find in my updated Final Pitch post, but to give you a synopsis, I want to create a website that is focused on food, but also gives my audience/readers a glimpse into my life and who I am. I want to feature things about myself, what I’m interested in and what I’m doing in hopes to be able to connect with others like me.

What I took away from the readings was the complexity of WordPress. It is not as straightforward or easy as it seems. There are levels of complexity that are giving me a little anxiety knowing we have to navigate WordPress to create the site. On the other hand, as stated in my last post, being able to use a platform like WordPress also gives us a safety net to rely on, which I really appreciate.

For my PHP code assignment, I added a comment box where site visitors could input their name, email address, and comment. I explain in my code, that the comments will all be replied to individually and thus the email address is needed. I want to be able to incorporate this into my final project as a customization. I also want to be able to incorporate liking the content because I think user engagement is most important. That being said, the PHP code assignment was not as easy as I thought it would be. While this might be my favorite code-type we’ve learned thus far, in practice, PHP can be difficult. At first, I was having trouble echoing the different boxes I had created. I Googled my way through it, but I’m hoping to be able to learn it on my own in the future.

Questions:

  • For the next class, will be going through how to create the repository for our final project in GitHub?
  • Will you walk us through how to install WordPress on our hosting service (like GoDaddy)?

The WebMD of Web Development

This exercise was not as terrible as I thought it would be. For the first time in seven weeks I can say thank you to Codecademy for leaving me with a boat as I did the homework. As always there was a necessary assist from W3Schools, the paddle, but I was not completely in the dark this week.

That being said, I have to thank W3Schools for explaining how to connect my PHP file to the HTML page. I looked back at my notes, and reflected on our class, and realized that the explanation from Greg was the only one we had to go on.

Now there was some confusion, which showed up when I sent my repository. Every now and then Googling the answers feels like looking to WebMD for a health diagnosis and falling down a rabbit hole. Since Codecademy gave no instructions, I looked to W3Schools. They helped me get some of the code but showed several different ways of connecting and referencing the PHP and getting it to do things. Naturally, I chose one that did not do what I thought it did. This explanation, among the four others available, seemed to make the most sense though. Well now it’s been fixed and the code does what it should.

I am definitely happy to be moving on to editing code instead of writing it from scratch. I am narrowing down the themes and am ready to adjust the child theme to be what I need it to be. I’m also excited to see my dad’s reaction, hopefully a happy one, when the site is done. I am not excited for the many more bottomless pits that Google and W3Schools will be dropping me in. Yes, trial and error are all part of it, but doctors tell patients to avoid WebMD, we seem to be doing the opposite.

Oh well. C’est la vie.

Questions from Week 7 Readings

I thought out readings this week were very helpful, especially because I actually understood some of the concepts on first glance without having to Google search every other word in the document. A few terms that I did struggle with a bit were as follows:

  1. WP_DEBUG – When I first read through the instructions, I understood how to turn this on and off the debugging feature from the instructions provided, but did not understand what that would show on the site? Does this show you errors in your code on Sublime or in WordPress? I know we’ve spoken about debugging and checking errors in your code before, but I’m still a bit confused about how you open the code, check the code, understand the error messages, etc. I really appreciate the second portion of the document that explained how to display the error message in a clear, director manner. Although I still struggle a bit to understand what the bug lingo means (e.g. “call_user_func_array() expects parameter 1 to be valid” is not a clear description of the problem to me, whereas something like “the code is missing a bracket” would be very helpful).
  2. The section on WordPress templates was a bit confusing to me. Based on our discussion last week, I thought we should only be adding content to the “wp-content” folder and then if we having something that is functional (e.g. PHP or jQuery) it should go in the plugins folder but then something that is more design based should go into themes. According to the reading, however, the header, footer, sidebar, etc. themes that you may want to add should end in .php – so wouldn’t that mean they belong in the plug-in folder? If it’s a template, it’s a design feature, but when why is it built with a function code?
  3. Was the “Custom Fields” reading basically describing when you scroll over an “email” form on a website and it drops down the 3 or 4 emails you have used on that account? And in that scenario, the “key” would be the email field and then the value, or values, is the 3 or 4 email addresses the computer has saved from previous entries? The example made sense, but I was struggling to understand when you would use it in a practical sense as you are likely not going to put “Currently Reading” and “Today’s Mood” into custom fields on a regular basis.
  4. Lastly, if we have time I would like to go over how to “enqueue the parent and child theme stylesheets.” I read through the description several times, and if it’s simply copying the code, as with adding a link to a style.css sheet in HTML, then I can copy the code, but I was unclear if there are certain labels/titles/lines that need to match the code I write.

Final Pitch – Profile/Portfolio

Goals: For my final project, I have decided that I’d really like to add on to my current website and make it a portfolio/profile page about myself for potential future employers. I want to make this kind of website page because I believe that as a Public Relations professional, it is crucial to have some sort of landing page that speaks to your skills – not only from a communications perspective, but from a coding/web design perspective (especially when I can say that I have designed the page myself!). The audience of this page will be current and future coworkers, my networks, visitors to my LinkedIn page, and future employers who will view my page through an application submission. I hope that this will make me look like a robust and mature professional in my career, to be able to provide a landing page for easy-to-access content to my resume, portfolio, and more.

Audience: The audience of this page will be current and future coworkers, my networks, visitors to my LinkedIn page, and future employers who will view my page through an application submission. I hope that this will make me look like a robust and mature professional in my career, to be able to provide a landing page for easy-to-access content to my resume, portfolio, and more.

How I’ll Achieve My Goals:

Theme: Lighthouse

Track: I will be doing mostly front-end modifications, with some back end tweaking.

Planned Modifications:

  • A contact form in the footer of each page that will send an email to me alerting me of the submission.
  • Display an embedded document (my resume) on my website.
  • Add images of me and my previous work.
  • I will add link to my social media accounts as a way for website visitors to find me.
  • Add a Google font to make the text more unique and interesting.
  • Hover over menu options at the top of the screen in a particular color.
  • Add a Google map displaying my international work and travel.
  • Additional theme, color, and design element changes, including modifications to the navigation bar.

URL: lucynegash.com

Wedding bells beget a new color scheme

Before cracking any code this week, I tried to envision my site as a finished product so I could make a list of all the changes I wanted to make in my child theme. I knew of a few functionality add-ons I wanted to try (anchor links, a floating taskbar, etc.), but I was still fuzzy on the basic look I wanted.

Right now, I’m on a train coming back to D.C. after four days on the beach in Rhode Island. My sister got engaged last week, so our whole family plus significant others spent the weekend talking about possible wedding venues, buffets vs. table service and how to whittle four enormous Italian families (two on the bride’s side, two on the groom’s) down to a guest list of 200.

One of the wedding magazines I brought my sister as an engagement gift featured 10 pages of possible wedding color palettes (apparently each wedding warrants an entire palette unto itself?), and as we browsed through, I came across one that I loved—poppy red, teal and gray. It wasn’t until today, three days later, while working on WordPress on the Amtrak home, that I realized I could use it as my website palette. Word is still out on whether Erica will use it for her big day, too.

I know I want a clean, no-fuss, user-friendly site, so a lot of the changes I made this week were subtractions. I took out an icon that was appearing on every post to designate its type; I removed the footer; I hid all the sidebar widgets that made the bottom of my page look so cluttered. Even though I may decide to add some stuff back in as I flesh out the rest of my site, I like starting from a cleaner slate, and it’s looking a lot more like what I’d envisioned. I’m feeling more confident poking around in the code now that I have my child theme with the parent theme as a sort of backup. My only big frustration was in trying to change the border colors on the little bubbles around my posts—I couldn’t change it in the style sheet no matter how many different ways I tried. Turns out I needed to change it in the admin, and it’s not as customizable as I would have liked. I’m not giving up yet, though! Hack hack hack.

APIs and general generalisms

Looking at the API tutorial article has again shown me how I can learn a lot in this class and then still need further explanation of something after reading it. I missed last class and I don’t know if we went over this, but I am unclear about what exactly an API is supposed to do for us as end-user journalists, even after reading the paragraph “The fundamental question: What can this API do for me?” several times. I would like to have a nuts and bolts answer to the question, what do I want to get out of the API, and how do I do that?

As far as the project is going, I have been thinking that the best way to go about it is to take the Twenty Twelve theme and fiddle around with the controls that WordPress allows us to do, and see where that puts me. Then I would like to get into a discussion (with myself!) about what I want the site to do that WordPress doesn’t have a specific allowance for, and then work on how to build it myself or whether it is implausible. I am pretty confident that WordPress can do a lot of the things that I want to have on the site because it looks pretty interactive from the controls that I have looked into.

My first plugin and custom post type

Knowing that I want to have custom post types for different types of content, I set out finding the best way create custom posts.  Plugins seem to be the easiest way to add custom post types, but the WordPress codex didn’t seem to give me all of the answers I needed.  I was understanding how some of the code worked, and that it needed hooks.  I wasn’t entirely sure what code to edit or whether I should make new files or change existing ones.  I didn’t know whether this was a content or an admin issue, as the posts usually come from the dashboard.

Plugins made this simpler, as I discovered that I could just make a whole new file in wp_content/plugins, and not be at risk of screwing up any of the other files.  I also decided to look at some examples and use a template of some code, just so I could get something working and not have to start from scratch.  There are so many pieces to custom post types; it really helps to look at what some other people have done in order to get it working right.

After following the WordPress codex and a great article about plugins and custom post types I saw here, I was actually able to see my plugin, working, on my local site, which felt like a big accomplishment after spending hours reading and looking at tons of code and step-by-step instructions.  I activated the plugin and saw my custom post type show up in the sidebar, allowing me to click on it and start typing.  Although it currently has the same functionality as the regular post, I’m exciting that its working.  Now the next step is to learn more about meta-boxes and figure out how exactly to get my custom post type to do what I want it to do.

You have to love time savers

Although I have not yet memorized even a quarter of the commands that exist, I have a way better understanding of command lines and why they would be used. I even read from the assignment that there are ways to make changes to all of your folders at the click of a command, saving tons of time. When Greg first introduced this to us, I was confused on how web development and these commands related to one another. If I understand correctly though, we could essentially access and change files even in our WordPress folders and at a much quicker rate if we have a similar thing to change in all of them. Needless to say, anything that eliminates extra/unnecessary time has a good rating in my book.

For my site, I am currently in the works of adding a widget for my Facebook and Twitter account. I have not made any local to live updates yet, but I’m hoping to do so tonight after I CORRECTLY add this (crossing my fingers). For this week and hopefully even tonight, I plan to add the widget and I’m considering a taxonomy plugin.

One issue I’m having is I’ve noticed the example provided of my theme differs a lot from how my theme actually shows up. I chose this theme because it placed the slideshow right in your face, but it also showed feature stories on the right side of the page. I like it because each story had a a picture adjacent to it and it reminded me of a more professional news site. Now I’m trying to figure out if that’s something that I will have to add in through coding or the admin page. I will update this post when I finally get my plugin to work.

 

Wonder what my potbelly junior high science teacher is up to now?

When I was in 7th or 8th grade, our science teacher pulled up this TV screen with green letters and numbers on it. He said, “This is a computer.”

We all stared and blinked. He continued, “No, look it’s really cool. You can make it do things for you, like count to infinity.”

We spent the next 20 minutes or so typing random letters and numbers into the black screen (or watching him do it anyway), and to our lack of amazement, the machine started to count. Over the course of the next week or months (I don’t remember), the machine counted on … and we went about our lives. It may still be counting; I’m not sure. But that was my introduction to code.

It took another decade and the invention of AOL chat rooms for me to get interested in computers, so I missed out on the evolution – the result of which a very slim screen is displaying in front of me now! Amazing (I wonder if this thing can count to infinity?). Anyway, that brief introduction to code always gave me an appreciation of what mysterious numbers were working in the background of my computer programs. I knew there was something more, and even as we’ve learned these new concepts in class, I appreciate how it all shares common ancestry.

The problem is, much like when I was 12 years old, my interest in learning to make computers do what they do is limited. I definitely enjoy knowing how things work, but just the wavetops.  I like knowing just enough to be dangerous. The good news is I am confident this class will get me there. Despite all the frustration in trying to grasp the concepts, the worry about getting a low grade, and the reality that most of the details will be forgotten in a couple of months (let’s be honest, weeks), I think the exposure will leave me in a very similar state to my first code “exposure.” I’m sure the next time I see a web developer working on something, I browse through a site, or tweak my own, I’ll have a deep and healthy appreciation for what’s happening in the background. And after this class, it will be an appreciation for more than just the MS-DOS.

As for APIs, well I’m getting there. It seems most of the articles are written for people who have at least a little experience with web development. That makes it tougher for the beginners I think. I’m going to start cutting and pasting stuff into my site though, and see what happens. Maybe I’ll create a web page in my science teacher’s honor … one that just keeps on counting. He’d be so proud.