January 2015 Archives

How I Solved Related Posts not Showing when Running WordPress, JetPack, and Nginx

Ever since I started this blog up again at the beginning of January, I wanted to have related posts be visible at the end of each post. I use JetPack and I figured turning Related Posts on would be easy and I would be all set.

Well, not so much.

I turned on Related Posts and discovered nothing was appearing. I knew there wasn’t really anything that could be wrong as I don’t have any errors in WordPress, PHP-FPM doesn’t report errors in any of my logs, and I can use other services like Stats and the like.

I did some digging and after my search turned up nothing, I reached out to Automatic support and asked about my JetPack issue. We worked through a few things including making sure Stats was working, the JetPack servers could see my site (which they did). We even checked to make sure the plugin was even grabbing data to display in the first place. This can be done by adding ?relatedposts to the end of any single post URL. You’ll get a JSON blob in return if it’s doing what it’s supposed to on the back end. We figured, well, that can’t be it either. Turns out, the answer wasn’t anywhere where I was expecting it to be.

My problem was with my Nginx server configuration for this site.

Here’s where it gets technical. For any path, you’ll have a set of URIs for the server to try before it gives up. The code usually looks like this:

try_files $uri $uri/ /index.php

In most cases, that’s right! WordPress will work just fine like this. You won’t notice errors and everything will parse fine… except for JetPack’s Related Posts plugin.

See, with the above line of code, we’re telling Nginx that it’s ok to try the URI by itself, with a slash after it, or try index.php by itself, depending on what the URI actually is. Nginx, however, is very detail-oriented and will only do exactly what you tell it to do. In my case, I left out a specific instruction: process index.php with arguments, please. By doing so, we turn the above line of code into this line of code:

try_files $uri $uri/ /index.php?q=$uri&$args

JetPack calls upon that JSON blob I told you about a bit ago just like that: index.php followed by the URI (not fancy, something like a post ID), and any additional arguments necessary after that. So in the case where my post ID is 105 and it’s grabbing the related posts for that, it would be calling



I hope you find this helpful. If you did (or did not), leave a comment below.

Learn to Code as Early as You Can!

One thing I always wish I would have paid more attention to when I was younger was coding. I believe my generation is just the start of the potential batch of humans that become masters of writing code and making apps that do random things. My problem is I feel like I’m a bit behind the curve because I didn’t pay as much attention to it nor did I have a solid path to learn code in the first place…

There’s a huge demand for software developers. A lot of these developers went to school for computer science and built up the foundations necessary to be successful in that career. While I’m decent—I could hold my own if I was writing something with HTML/CSS, Python, or PowerShell—I think I would be even better if I had paid more attention. When I was younger, I didn’t care so much about stuff like that. I wasn’t interested in the future. I was interested in girls and just making it through high school. If I had really kept my nose in the books so to speak, I could have gone to a good school and today I would have a CS degree and likely be pretty good in software development.

I know what you’re thinking. Just because I didn’t get a degree doesn’t mean I can’t excel at programming. You’re right. That’s why I’m good with the above languages I cited. I used to be good with PHP, too, but that was before high school and those brain cells rusted out; a lot has changed with PHP but it’s not foreign to me. I use WordPress every day and I can handle my own when reading and understanding code.

Where to Learn

There are a ton of resources out there to learn to code, some online and others in person. Here’s a good list from what I’ve discovered and personally think are fantastic:


In Person

There are a lot more out there, I’m sure, but these are just the ones I’m familiar with. Not all services and locations will offer up the same courses, but I think there’s a good mix of online and in-person resources to get anyone to a good place to start making their own apps.

Once you have a solid foundation, it’s time to experiment and start making stuff. You’re at the point where you won’t get a high-paying software development job just yet, but it’s coming. Here are some ideas and idea lists to get you started:

I’ve combed through a lot of these resources myself and have used some of the earlier resources I listed for learning to code. I personally believe that if you have the time and resources to learn in-person, you’ll have a much better time. If you don’t, please don’t fret. You might be surprised by how much you can learn online. If you ever get stuck, the very popular Q&A site for whatever StackExchange has great sub-sites for various programming languages but their biggest is StackOverflow. You’ll find an answer there, I’d almost guarantee it. Your problem probably isn’t unique if you’re working on something that may have been done before.

I might have regrets about not learning to code sooner, but it’s also very much not too late to learn. With the amount of free resources, there’s no excuse.


There’s an iPad app called Code Academy – Hour of Code that also provides great resources on the basics of development and programming. If you have an iPad and want to learn the fundaments in an hour a day, give it a look. It’s free so you have nothing to lose and no excuse not to do it.

If I Could Change Just One Thing

I get it. Working with another team can suck at times. I’ve had my fair share of cases where I wasn’t exactly thrilled about the idea of working with a team of people who I didn’t believe were in the right position to be of assistance. While that’s certainly my opinion, it’s not my place to tell them they’re idiots. It’s also not appropriate. That’s not the only thing that bothers me about inter-team dynamics that seems all too common today.

What really grinds me gears is the lack of open communication between multiple teams and parties that exists, today. Most companies have several teams and aren’t on the scrappy startup level. Some companies have multiple teams doing one type of task, although that number is significantly less. I am in the second boat. More times than I can witness, no matter what management has described, open communication didn’t exist and to even suggest it did was nothing short of heresy.

There’s a comfort zone or bubble that builds up when a team has been around a while and has had the opportunity to essentially do things the way they want to do them for some time. That bubble becomes something the team wants to protect at all costs because its safe and it feels nice. To have that taken away for what would at first seem like no good reason because now there’s team B coming in and helping with the same type of tasks, it can feel threatening.

This situation is amplified when team A tries to take the dominant position in the relationship and doesn’t even try to hide the fact that they’re trying to put team B into a lower, less useful-feeling place to perhaps push them back out. Think of it as a “good ol’ boys club” of sorts or even a country club. If you’re not a member of the special club or organization, then you’re nothing to them. You might as well golf in your backyard because you’ll never be doing it on their lush green grass.

I would fix that, if I could. This is 2015, in case nobody noticed, not 1986. These scrappy startups and small companies are thriving because they’re kicking @$$ at being one cohesive unit. If anyone expects to continue to be successful or even succeed once, this relationship can’t exist.

At this point, however, if it already exists, it won’t ever go away. This kind of dynamic comes from above. Subordinates tend to conform to how the rest of the team is moving. Changing something like this is hard if not impossible. In this scenario, someone will always be the redheaded step child. It’s about time we accept that and fire everyone who creates that type of environment. It’s not going to do anyone any good in the long run. It hurts morale and low morale hurts quality.

Vivaldi – A New Browser for our Friends

So there’s a new browser in town, put out by ex Opera big cheese Jón Stephenson von Tetzchner. It’s called Vivaldi and so far, it looks just as good as Vivaldi’s music sounds.

Vivaldi came to be after coming to the conclusion that Opera (the browser) just ain’t what it used to be. According to the site: “[Opera] is no longer serving its community of users and contributors who helped build the browser in the first place.” That’s a bummer. I liked Opera for a while, but then it started feeling super fat. It started feeling like Firefox. For what it’s worth, at the time, all third party browsers were feeling super bloated like they needed to have extra water drained out of them.

I downloaded it just now and toyed around with it for a bit. Obviously, on a Mac, installing an app is simple to the point of condescension in most cases. Just drag and drop it into the Applications folder.

On launch, there’s not much going on. Once you start browsing sites, it’ll do what other browsers do and show you your most visited sites. The UI is flat and clean. It blends super well with the UI theme that OS X Yosemite carries, and doesn’t feel out of place. The tab idea must really be working with users because it seems quite similar to just about every other name brand browser out there, which is fine. There’s no sense in reinventing the wheel if your existing wheel is super fast.

After launching a few sites, I noticed a really cool trend. The site icon that appears in the tab dictates the UI’s main color. The Vivaldi has a mostly red icon ergo the UI is the same shade red. Visiting The Great Discontent changes the UI to black, and Google to blue. It’s a subtle touch but is much appreciated. It takes the branding of the site the user is viewing and extends it over their whole screen. It’s almost as if the brand bleeds into the whole browsing experience.

There are a load of cool features coming soon, according to the Vivaldi Web site including:

  • Mail. What’s better than a really good competitor to Gmail? Who says they have to eat all the cake?
  • Bookmark/Notes/History/Session syncing across different devices. Smells like a hint that mobile will be a real thing.
  • Keyboard-based (Spatial) Navigation. Sounds like it could be good. Will have to wait and see how this turns out.
  • Performance Boosts. Nothing like a snappy quick browser. Even being slightly cracked out is OK, so long as it’s stable.
  • Extensions. Your browser needs to do so much more these days and they want to make sure that happens in the most secure method possible without impacting performance.
  • And More… They’re taking suggestions from the community!


I’m looking forward to seeing what this baby can do, especially with the upcoming release from Microsoft of their new “Spartan” browser!

Favorite Thing to This Day

In school my favorite subject was “Computers.” At the time, I didn’t quite know what that meant, nor did I really care. Kids thought I was nerdy because computers weren’t cool. The popular kids didn’t care about computers, they were athletes. That’s how they made friends. That didn’t deter me from keeping up with what I enjoyed the most.

I started with HTML in the 6th grade, and it escalated from there to include design and photography. Today, I work in IT at a rather large software company you might have heard of, and I enjoy it. If I had to change career paths at this very moment, the only shift I would make would be to photography, something that was stimulated by computers, too.

I experienced my first Mac around the 6th grade timeframe, too, but it was one of those colorful eMacs with the round one-button mice. I remember the next year my school bought newer white iMacs, still of the tube-television style one-piece setups, but the mice weren’t completely round anymore—though they still had one button.

Jump forward a couple years later into high school, and that’s when I got to feel my first, what I felt like was a legit iMac. It was a behemoth at 27” in screen size and I was blown away by it. The resolution—all those pixels—and the ability to have so much on screen and be able to do it all at once!

That was my last real contact with a mac until I bought my own in 2011. Don’t get me wrong, I used Windows computers, too. I built my own gaming-purposed desktop in the beginning of 2011 and rocked it like no other. However, it didn’t stick with me like my 15” Macbook Pro did. That same Macbook Pro is sitting in front of me right now. It’ll be four years old in roughly eight months and while I sank a lot of money into that gaming desktop I built, I can’t say it would be running the same this many years later, without intervention.

In IT, I’ve supported Macs, PCs, Windows servers, Linux servers, and any blend of those four technologies. If It hadn’t been for my interest in computers from the very beginning (with a Packard bell 486DX2-66), I don’t think any of my interests I have today would have flourished in any way.

Johnathan Lyman
Kenmore, WA,
United States
blogging, design, technology, software, development, gaming, photography