Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 319 of 429)

The Dangers of Using pre_get_posts in WordPress

In the previous post, I talked a bit about using `pre_get_posts` and how to efficiently exclude categories from the main loop.

Of course, in posts like that, the code is meant to be a point of reference or a starting place for which more advanced functionality can be written.

But one thing that I failed to mention about using `pre_get_posts` in WordPress is that it’s not limited to the public facing side of the site.

Continue reading

How To Efficiently Exclude Categories From The WordPress Loop

When it comes to writing custom queries in WordPress, `WP_Query` is the API to use. And I could be mistaken, but I do see a lot of people urging developers to avoiding using `query_posts` in WordPress in favor this newer-ish API.

But the thing is that `query_posts` still has its place in WordPress development namely in modifying the results of the data queried for The Loop when rendering blog content; however, one of the the biggest caveats is the performance that `query_posts` can have on the performance of the blog.

I’ve recently been working on a plugin where I needed to exclude posts from The Loop based on the category. At first, I was going to use `query_posts` but I ultimately hit a few snags, so here’s an alternative way to exclude categories from the WordPress Loop.

Continue reading

Register Now To Improve Your WordPress Development Skills

A couple of weeks ago, I shared a post in which I offered a class for helping you guys improve your WordPress development skills. Based on the feedback, emails, and tweets I’ve received, I’ve decided to move forward with the course.

I’m really excited about it, of course there are a few details that need to be worked out first.

But in the mean time, I’m looking to build up a mailing list of those who are interested so we can more easily communicate via mailing lists and email rather than blog comments and tweets :).

Continue reading

Attach Documents To WordPress Comments with Doc Comments

Earlier this month, I shared that I was releasing a WordPress plugin exclusively through the guys over at Foo called PDF Comments. 

However, in the last 25 days or so, I’ve received a lot of feedback generally saying that the plugin is something people need, but they need it to be more flexible in the document types that it accepts.

So I’ve officially rebranded PDF Comments as Doc Comments, updated the purchase page on Foo, and introduced support for a number of new document types.

Continue reading

Blogging Myths: Perfection, Focus, and Experiments

Comments are closed on this post. Please comment on the original post.

As someone who clearly loves to blog (as well as read what others have to say and build things for others to use), one of the things that I enjoy the most is hearing from others – specifically, family and friends – who want to get into blogging but aren’t sure where to start.

Blogging is a lot like Loch Ness: It’s a deep and wide sea that’s full of myths that can detract you from the actual site if you’re not careful.

Nessie isn't a myth. She's real. Okay? Okay.

Nessie isn’t a myth. She’s real. Okay? Okay.

Cheesy example, I know, but the truth is that there are several blogging myths all of which can seriously keep people at bay from pressing the publish button, and that’s a real shame especially if it’s an interest that they have.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑