Tom McFarlin

Software, Development, and WordPress

Page 370 of 392

Create a WordPress Upload Meta Box

This post was updated on March 22, 2013. Please review the code changes below.

WordPress makes it pretty easy to capture additional information with your posts through the use of custom meta boxes. Adding checkboxes, select options, textareas, radio buttons, and other input elements are easy.

But giving users the ability to upload files from a post screen requires a little more work.

If you’re not interested in tapping into the Media Uploader, then here’s how you can programmatically create a WordPress upload meta box.

Continue reading

Reroute Chrome’s alert() Dialog to the Console

I spend the majority of my time working in Chrome. Whenever I’m working with a lot of JavaScript, I tend to print information to the console for review.

The thing is, typing alert() is much faster than typing console.log() but alert() is exceptionally more annoying. For those of you that want to save a few keystrokes, copy this simple script into a file and include it before any other JavaScript on your site:

Continue reading

« Older posts Newer posts »

© 2020 Tom McFarlin

Theme by Anders NorenUp ↑