Simple WordPress PlugIn to Replace Excerpt With Full Post

Content As Excerpt Checkbox

I recently posted my lame joke video mashing together The Andy Griffith with Star Wars. In posting it, the excerpt for the post was showing on my site’s homepage and one had to click through to watch the video. There was nothing much to the text of the post – the only thing of note […]

Dynamically Overriding a Page’s Template

It is easy to override the¬†template for a post or page in WordPress in a few ways. For example, the naming of page template files can be used to override a single page’s template: page-{id}.php page-{slug}.php Or, a page template can be chosen in the Page Attributes section when editing a page: This works great […]

Hiding the categories of a post when it is “uncategorized”

If you’ve ever had some posts on your WordPress blog, you will have noticed that the “Uncategorized” category is displayed with a link to an archive of uncategorized posts. The easiest way to solve this, of course, is to categorize every blog post. But, if you don’t want to for some reason, you can use […]

Hiding the WordPress admin bar on certain pages

There may be times when you would like to hide the WordPress admin bar on certain pages. Maybe the admin bar interferes with the design, for example. This can be especially true for things like pages opening up in a lightbox. Fortunately, it is not too difficult to hide the admin bar on certain pages […]

Using MailCatcher for local mail testing

When developing web applications on your local machine, you will often want to test e-mails. For the longest time, I would use an environmental switch in PHP depending on the domain (for example, I would set different values if the domain was stirrell.second-cup-of-coffee or www.second-cup-of-coffee.com) and include values for email addresses. I had my local […]

Display the caption of a featured image in WordPress

Have you ever wanted to display the caption of a Featured Image in WordPress? I recently had need to do this and figured out a way to accomplish this. When you set the Featured Image for a post in WordPress, you can add additional information for the image: Title, Caption, Alt Text and Description. It […]

Adding a Prefixr command to TextMate 2

I was recently looking into how to add a Prefixr command to TextMate 2. For those of you not familiar, Prefixr is a way (created by Jeffrey Way of NetTuts) to take a new-ish CSS property like box-shadow or transform and add all the vendor-specific prefixes automatically. So: transform: rotate(-7deg); becomes: -webkit-transform: rotate(-7deg); -moz-transform: rotate(-7deg); […]

Setting UTF-encoding with a PHP header

Sometimes, I need to write a one-off PHP script to export/import data from a database, for example. Since I am not using any kind of front-end interface, I have found that I sometimes have to specifically set the encoding on the page to avoid any extended character issues with the database. I use: header(‘Content-Type: text/html; […]