Query WordPress Directly When Making AJAX Requests in WordPress Plugins and Themes

In advance of this evening’s WordPress Knoxville meetup on Writing a WordPress Plugin, I’m posting my favorite method for handling AJAX requests in WordPress plugins and themes. The following gist addresses where you send your AJAX requests when you’re making an AJAX call inside a WordPress plugin or theme.

Here’s an example request you might make in your JavaScript:

The following code added to your theme or plugin allows WordPress to handle the above request:

NOTE: In order for the above code to work, you’ll need to flush your WordPress rewrite rules. Short of adding some code to your theme/plugin to do this, the quickest way to flush your rewrite rules is to visit Settings > Permalinks. Whenever that page loads, flush_rewrite_rules() is called.

UPDATE 11/26/2013 (06:09): At last night’s WordPress Meetup, Chris Lamm showed me the preferred way to make an AJAX request in WordPress. Here’s some further details on how to make use of the feature Chris outlines in his afore-linked-to example.

Collaborators Wanted – WordPress, PHP, Graphic Design, Web Development

help-wanted

I’m currently seeking one or possibly two freelance web developers for collaborating with me on a couple of different on-going projects. Here are the details of what I’m looking for:

1) Easy Collaboration

Are you available to devote a moderate amount of time (i.e. perhaps 15 to 30hrs) each month to tasks that I assign to you? I’m anticipating I’d want you to bill hourly for your time.

Being located in or near Knoxville, TN is a plus. Although I suspect we’ll want to teleconference most of the time. [Read more...]

Apple TV Tip: Take Advantage of Your YouTube Playlists

YouTube Playlists on Your Apple TV

Recently we’ve discovered how handy YouTube playlists are on our Apple TV. Whenever we find content that we want to watch in succession, I add it to a playlist on my YouTube account for later viewing. The reason why this is so handy is because Apple TV will play all items in a YouTube playlist without interruption. The utility of this becomes apparent once you consider a couple of examples: [Read more...]

Two Tips for Increased Email Efficiency

Last week I wrote about the Sparrow Mail App and how it has increased my email efficiency. Just yesterday I learned that the app is going to be mothballed because the company that makes it has been acquired by Google. However, despite Sparrow’s short-lived status as my “go to” mail app, during my time with it, I gleaned two email efficiency techniques which are applicable to any email client. Both are quite simple, and when averaged out over a week’s worth of emails, they can save you much time. [Read more...]

Sparrow Mail App – “Quick Reply” is my favorite feature

UPDATE (07/24/2012):
Google has bought Sparrow. The Sparrow Mail app will no longer be developed. Oh well, it was fun while it lasted. Further details from TUAW:

Back in 2007 I switched over to using Google Apps for my email. Since that time I’ve used its online interface almost exclusively. The advantage of using the same interface to check my email anywhere far outweighed any negatives that came from not using a desktop mail app. What’s more, as the Gmail interface has matured, I’ve come to prefer it over any desktop clients I’ve used in the past. So, when I first heard about the Sparrow for Mac, I wasn’t too interested, but after picking the app up on sale this past weekend, it has become my goto email client because of one simple feature: Quick Reply [Read more...]

My Kindle’s Place in an iPad World

I’ve often said that my iPad is my favorite electronic device ever. I love its utility, portability, and ease of use. Its app-centric focus and sleek design lets you forget you’re using an iPad and focus on your task at hand. Given how much I enjoy using it, you might think my Kindle e-reader would fall by the wayside, and that was true at first. But lately I’ve gotten more enjoyment out of my Kindle, and this is due in part to one positive and one negative aspect of my iPad. [Read more...]

Links of Interest: 99% Invisible Podcast

99% Invisible - A Tiny Radio Show About Design with Roman Mars

If you’re into design and architecture (even if you’re not and you just enjoy good story telling) and you’re not subscribed to the 99% Invisible podcast, you should be. If you are, why haven’t you told me about it?!

Click to Subscribe in iTunes

Having just listened to a handfull of episodes so far I’m already hooked. In a way that I would have never expected, the show’s host, Roman Mars, uses the medium of audio to vividly convey design-centered topics. So far I’ve been transported to Belgium to sample what is perhaps the world’s rarest and best tasting beer, I’ve learned about the short story which provided the genesis for the Geico caveman commercials, and I’ve considered how one might redesign our US currency and why that might not be a good idea. As Mars says, each episode is better than the last no matter which order you listen to them in. ;)

[Read more...]

Kickstarter.com – Some of my favorites

If you’ve never heard of Kickstarter, please allow me to make an introduction. Kickstarter.com is a website where inventors, artists, entrepreneurs, etc. can post their project ideas and solicit funds while offering various incentives for those who participate. What is revolutionary about Kickstarter is how well it combines the web’s ubiquity and easy payment options into a “viral funding” opportunity. It has allowed people with ideas to market their ideas directly to the people who are most interested in them. Some of the more successful projects have raised tens of thousands of dollars in just a few days. The term “Kickstart” is quickly becoming a verb used to describe crowd-sourced fundraising. [Read more...]

Spotify: Oh, now I “get it”

Amid a wave of publicity, online music service Spotify launched in the US nearly one year ago. Since that time, if you’re on Facebook, you’ve probably seen ads for the service and status updates from your friends which show what they’ve been listening to. The service is a fantastic concept: it combines user-uploaded music into an ad or fee supported service which makes the record companies happy and let’s you find and play virtually any song instantly. For many music lovers, this is the perfect Internet jukebox; however, as I’d merely consider myself a burgeoning audiophile, I hadn’t been so quick to adopt the service until I found my personal best “use case” and started making the service work for me. As there are probably others out there like me, I thought I’d share how I discovered the magic of Spotify. [Read more...]