Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 293 of 428

A Strategy To Separate Comments and Pingbacks in WordPress

One of the luxuries offered by WordPress – in addition to the commenting system – is the ability to know when someone has given us a ping or a trackback by mentioning us through another blog and linking back to a given post.

If you’ve ever developed themes, then you’re familiar with the need to display both comments and trackbacks someone in the single post page; however, sometimes you want to separate the two from one another so not to clutter the discussion.

The WordPress API makes this possible in a couple of ways, but there’s one way that I find myself preferring over the others for which I tend to think lends itself to cleaner code, though I’m interested in your feedback on this.

Continue reading

Using Mixins in CSS: Developer Abuse and Misuse

When it comes to the various CSS preprocessors that are available today, I think one of the dangers that we – as developers – face is using certain features that were not previously possible in vanilla CSS as a sort of crutch.

By that, I mean that I think that we have a tendency to fall back on things that we’re used to in our server-side environments as opposed to practices that are more preferential on the client side.

For example, I there are things that we used to do – or should be doing – with class names as opposed to mixins, but may not end up falling back to using mixins as opposed to more general classnames.

Confused?

Continue reading

Update Your WordPress Projects on GitHub with the GitHub Updater

It’s no secret that many open source developers love GitHub – it’s an amazing service that makes sharing and working on open source projects really easy, both from a project management standpoint, and from a developer/contributor standpoint.

But if you’re in the business of building WordPress plugins, and you enjoy taking advantage of the services offered by the GitHub plugin repository, then one of the things that makes it difficult to keep your work on GitHub is the lack of ability to update your plugin.

Of course, projects have been released that allow you to sync both repositories, but if you’re interested in going 100% with GitHub, then check out the GitHub Updater Plugin.

Continue reading

The Dangers of Blogging (Or “Get a Thicker Skin”)

Arguably, one of the most intimidating things about blogging is knowing that you’re constantly opening yourself up to critique.

For the most part, this isn’t something that’s really all that bad especially when you consider that that you’re offering information up to help others, or to ask others for help in a given situation.

More often than not, I’ve found that people are happy to oblige one way or the other through comments, emails, tweets, and so on.

Unfortunately, you can’t have one without the other.

By that, I mean that every positive comment, every reaffirmation, or every bit of advice offering ways to improve what you’re on saying, you’re likely going to be generating negative feedback and/or criticism from someone.

The thing is, positive feedback usually comes in the form of retweets, shares, and so on.

Negative feedback may be harder to detect unless it’s posted directly in a comment because – for whatever reason – others don’t always mention your handle in tweets, pingbacks, and so on.

On one hand, perhaps ignorance is bliss, but I’m of a different mindset: If you have something negative to say about a person or an idea that they’ve shared (after all, it’s not always personal), then why not bring it to their attention?

Continue reading

An Easy Way To Check if a Post is Paginated

Out of the box, WordPress supports the ability to paginate individual posts.

For those who aren’t familiar, it means that you’re able to literally paginate your posts such that a post may consist of multiple pages (kind of a weird concept, huh?).

Paginated Posts

Some people may use this feature, some people may not; however, if you’re working on a theme, then you need to be prepared for this case and provide appropriate styling.

But the way if which you determine if a post is paginated or not can lead to a bit of cluttered code, so in order to keep the code as readable as possible (and to keep the logic separated from the template), here’s one way that you can check is a post is paginated.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑