Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 48 of 428

Use Meta Box to Create a FAQs Page in WordPress

This post is brought to you by Meta Box and the work they are doing to make working with custom meta boxes easier for all WordPress Users.

A FAQs page, as many of you know is short for Frequently Asked Questions, is a commonly used page to provide quick answers about a product or service. They’re common to us all, but it’s important to note the role they play when establishing a relationship with the customer.

Furthermore, if you run a site built on WordPress, you may also find it helpful to know how to build a custom FAQ template, as well.

In this post, we will share an easy way to create a FAQs page in WordPress by using the Meta Box plugin.

Continue reading

My Unplanned Halftime (A “What’s Up?” Post)

I’m not one to usually start a blog post with “it’s been a while since I’ve last blogged” because it’s usually followed by an apology as if the people who consistently read the blog or follow the blog have been waiting with bated breath for the next post to come out.

But is that ever really the truth? I can’t imagine that scenario.

That doesn’t mean I’m not doing that with this post, though. Because it has been a while since I’ve blogged. I’m not going to be making any apologies for it, though.

Instead, how about a few updates as to what’s been going on and what I’m planning to do with the rest of the year?

Continue reading

How To Remove Images with DOMDocument

I’ve written about DOMDocument in a few other posts (1, 2, 3 to share a few) but I continue to find it useful in different ways.

Remember, DOMDocument is a class in PHP that allows us to manipulate the HTML document before rendering it in the browser.

From the manual:

Represents an entire HTML or XML document; serves as the root of the document tree.

Whenever I think of working with the saveHTML function, I think of needing to serialize the new information into a file or other output stream before sending it to the browser.

But we don’t have to do that. It can be done in memory.

Continue reading

The Difference in cURL and WordPress Requests

cURL is a very popular PHP library that I’ve referenced in several posts other posts (1 and 2, for example). And it’s one that I think should be reviewed, explored, and possibly used by anyone working in PHP (yes, even those working in WordPress).

But because of the native WordPress APIs, we do have a level of abstraction that allows us to achieve much of the same functionality (if not the same functionality).

Specifically, I’m talking about wp_safe_remote_get.

This function is ideal when the HTTP request is being made to an arbitrary URL. The URL is validated to avoid redirection and request forgery attacks.

I specifically mention the safe variant of this function for the definition above (there is another variant, but it’s important to take precautions against arbitrary URLs for security reasons).
Continue reading

Episode 6 – PHP, UI, UX, A11Y, APIs (Oh My)

Regarding the podcast, two of the best things that’ve happened since the previous episode is that the number of questions is steadily increasing and people are saying they appreciate the length of the show.

So that’s good stuff, as far as I’m concerned.

Anyway, if you’ve previously subscribed to the show, then this episode should be available in your favorite app or service.

With that, here are the notes for this episode.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑