Tom McFarlin
Tom is a self-employed developer who loves writing, building, and sharing WordPress-based projects. He runs Pressware where he provides WordPress goods and services. You can follow him on Twitter.
Tutorials
  • Code
    A Guide to the WordPress Theme Customizer: A Methodology for Sections, Settings, and Controls – Part 2Theme customizer 400
    8 shares
    In the last article, we defined a simple methodology for everything that's required to establish a new Section, Settings, and Controls within the Theme Customizer. In this article, we're going to continue with doing more of the same; however, we're going to be adding new settings and controls into the existing section, but we're going to be looking at a variety of different options such as radio buttons, select boxes, and input boxes. So with that said, let's continue.Read More…
  • Code
    A Guide to the WordPress Theme Customizer: A Methodology for Sections, Settings, and Controls - Part 1Theme customizer 400
    18 shares
    At this point in the series, we've covered everything from understanding why the Theme Customizer is beneficial to those of us who are designers and developers, how to implement it in our theme, and understanding the relationship between sections, settings, and controls. We've also taken a look at how to implement our own setting and control into one of WordPress' predefined sections. In this article, we're going to take a look at what's required to introduce our own section and a variety of settings and controls. This article will cover a methodology that can be followed for implementing new settings and controls, and how to apply this methodology for introducing a new section, setting, and control. We'll expand on this topic in the second part of this article by introducing additional controls. But, for now, let's take a look at the methodology, and let's introduce a new setting into the Theme Customizer.Read More…
  • Code
    A Guide to the WordPress Theme Customizer: Adding a New SettingTheme customizer 400
    18 shares
    By now, we've taken a look at what the Theme Customizer is, how it works, and the components that are unique to it. We've even discussed how options are serialized into the database so that we may retrieve them later when using our theme. To that end, it's time for us to begin doing our own work with the Theme Customizer. In this article, we're going to take a look at transports, how they work, and the difference in their two primary methods. Additionally, we're going to introduce our own control into one of WordPress' existing sections and see how it works with the various transport models.Read More…
  • Code
    A Guide to the WordPress Theme Customizer: Sections, Settings, and ControlsTheme customizer 400
    10 shares
    In the last article, we created a very basic theme that included the Theme Customizer so that we could see how it looks within the context of the WordPress Dashboard. After tinkering around with the provided options, it's easy to see just how powerful this particular feature can be. Generally speaking, this single feature can allow us to steer users away from complicated options pages and allow them to see the result of their changes as soon as they make them without having to hop back and forth between the dashboard and the public-facing side of the site. And as much fun as it is to begin writing code to bring new features to life, it's important to understand what we're working with before we begin actually doing work with it, right? So in this article, we're going to take a survey at what goes into working with the WordPress Theme Customizer. By the time you finish this article, you should have a clear understanding of the Theme Customizer, and how to begin introducing your own settings into existing sections, creating new sections, as well as some of the built-in controls that are available for us to use in our work.Read More…
  • Code
    A Guide to the WordPress Theme Customizer: Getting StartedTheme customizer 400
    9 shares
    In this series, we're taking a complete look at the WordPress Theme Customizer. Specifically, we're understanding exactly what it is as well as why it benefits us, how to integrate it into our theme, how to work with it in the context of other themes, and how to introduce our own sections, settings, and options into the Customizer.Read More…
  • Code
    A Guide to the WordPress Theme Customizer: What It Is, Why It Benefits UsTheme customizer 400
    24 shares
    About a year ago, we did a short series of articles on WordPress' Theme Customizer. Now that the Theme Customizer has been available in WordPress for quite some time, and now that developers have had the opportunity to implement it into some of their work, we thought it would be useful to revisit the topic.Read More…
  • Code
    Migrating Your WordPress Database: WP Migrate DB - Development to ProductionMigrating your wordpress database 400
    6 shares
    If you've been pacing with this series, then you know that we've been working to not only survey the WordPress database, but work with tools that make our job easier for performing migrations. Case in point: WP Migrate DB. In the previous article, we reviewed how to actually migrate data from production to development, but in this article we're going to look at just the opposite. Though the steps are extremely similar, I find that this situation is a bit more common than the previous, especially for those who are in the business of building a site from the ground up.Read More…
  • Code
    Migrating Your WordPress Database: WP Migrate DB - Production to DevelopmentMigrating your wordpress database 400
    6 shares
    In this series, we're taking a look at not only the structure of the WordPress database, but strategies that make it easy to perform migrations from development to staging, staging to production, or any of the aforementioned permutations. Most of the articles and the tutorials that we provide are obviously long form posts; however, for the remaining two articles in this series, we're going to be looking at two screencasts that walk us through exactly how to use the WP Migrate DB plugin. In this article, we review how to move content from the production environment to the development environment. Then, in the next screencast, we look at how to do the opposite. So, rather than preparing to spend a lot of time reading, prepare to watch a short screencast on exactly what you need to do, and be sure to review the show notes at the bottom of the post.Read More…
  • Code
    Migrating Your WordPress Database: A Database PrimerMigrating your wordpress database 400
    14 shares
    When it comes to working with WordPress-based projects, arguably one of the most frustrating or tedious aspects of deployment is actually getting the databases across your environments in-sync with one another. Sure, there's something to be said for using test data in development, user data in staging, and actual data in production, but there's no such thing as a silver bullet, right? That means that sometimes test data is going to work; other times, it won't. For example, let's say that you inherit a project for which you have to pull down a database and then begin working with existing data. Or let's say that you have to migrate an entire site or application from one server to another. In cases like that, test data doesn't help a whole lot. Instead, you need a tool for it. And sure, the WordPress Importer is a fair tool for basic migrations, and running SQL exports and imports is okay if you're comfortable with database front-ends and working with SQL itself. But what about those who are somewhere in between?Read More…
  • Code
    A Look at the WordPress HTTP API: A ReviewDiagram http api
    2 shares
    One of the challenges that comes with writing a series about an API - or even part of an API - is that it's hard to cover every aspect of said API without spending too much time diving deep into one part and simultaneously trying not to simply skim across the top of each API without giving enough practical information. Case in point: Throughout the last series, we've been taking a look at the WordPress HTTP API. Specifically, we've covered wp_remote_get and wp_remote_post, and we've done some relatively extensive work with both functions including building example projects. The thing is, there's still a lot of ground that could be covered in the WordPress HTTP API. In the future, we may do an advanced series on more aspects of the API, but for now, let's review everything we've covered in this series.Read More…
  • Code
    A Look at the WordPress HTTP API: Saving Data From wp_remote_postDiagram http api
    2 shares
    In the previous post in the series, we began working on a small plugin that provided a practical example of wp_remote_post. The thing is, the example was incomplete. Sure, it's nice to see how to make a call using the function and even how to setup a script responsible for receiving the data and returning the data, but it's of little use unless we do anything with it. In this final article in the series, we're going to revisit the plugin that we started with the last article and begin improving it a bit. Specifically, we will... Review what we've done Begin making some changes to the work that we created in the last article Style the presentation with LESS in order to keep some of our newer skills updated Review the arguments accepted by both wp_remote_get and wp_remote_post Finally, all of the work accomplished in this article will be available on GitHub and linked in the conclusion of the article. But before that, let's go ahead and get started.Read More…
  • Code
    A Look at the WordPress HTTP API: A Practical Example of wp_remote_postDiagram http api
    7 shares
    In the previous article, we reviewed the previous articles regarding GET requests, the native PHP facilities for making requests, and reviewed WordPress wp_remote_post API function along with the arguments that it offers. In this article, we're going to make use of wp_remote_post such that we're actually able to see it in action. Remember that this - like wp_remote_post - is part of the HTTP API of which there are other functions worth reviewing. But, for now, we're going to put wp_remote_post to work. Specifically, we're going to do the following: When the page loads, we're going to submit some information to a custom script The script will examine the information and return it to our page We'll then display the data on the page Sure, it's a bit of a contrived example but it will give us the experience of creating a separate PHP script that can be used for operations triggered by the use of wp_remote_post. Anyway, for the purposes of this example, we are going to use the PHP $_SERVER collection to log when the user has submitted their preference rather than require that they have logged in. Finally, the source code will be made available on GitHub and accessible at the end of this series in the following article. For now however, let's get started with working on the plugin.Read More…