prependChild on DOMElement in PHP, Sort of.

This evening I wanted to add a new LI onto a WordPress navigation programmatically. After considering a few different options, I decided I wanted to use PHP’s DOMDocument, and use this as an opportunity to more familiarize myself with its … Continue reading

Posted in PHP, WordPress | Tagged , , , , , , | Leave a comment

Sometimes jQuery is (not) the Answer

It’s difficult to say, as much as I love jQuery I must admit that it is at times the wrong route to take when addressing a problem. While looking over a few questions on StackOverflow today I came across a … Continue reading

Posted in JavaScript, jQuery, Uncategorized | Tagged , | 1 Comment

Todays WTF Moment with CodeIgniter, MySQL and PHP

As routine as an oddly-twitching finger sabotaging any attempt to use your mouse, strange things  may take place with your environment, tools, or code. Today I was working on setting up a very small project with CodeIgniter when I came … Continue reading

Posted in CodeIgniter, MySQL, PHP | Tagged , , , , , , , , | 1 Comment

Unexpected Results While Styling WordPress Menus

Today I sat down to convert a static theme consisting of nothing more than HTML and CSS into a WordPress theme, complete with calls to functions like wp_nav_menu() for the construction of the menu’s. For this particular theme I began … Continue reading

Posted in Uncategorized, WordPress | Tagged , , , , , , | Leave a comment

Using Views in Kohana 3

What is a View? If you’ve never worked with Kohana Views in the past, they’re not hard to understand. Controllers handle most of your logic, Models handle the database communication, and Views handle the presentation of the data (generally-speaking). In … Continue reading

Posted in Kohana, Uncategorized | Tagged , , | 1 Comment

Jeff Atwood on The Pipeline

Like many people, I listen to podcasts most of the time I’m writing code. Unfortunately, most of these podcasts don’t have large financial backing and so at times they will dwindle up and die whilst others are sprouting up to … Continue reading

Posted in Remote Stuff | Tagged , , , | Leave a comment

Finding and Linking to Adjacent Posts with Same Custom Key/Value Pair in WordPress

Today I continued working on merging multiple custom post types back into regular posts, and differentiated them with a custom key/value pair. Some of these old post types would link to their adjacent siblings – videos to previous and next … Continue reading

Posted in WordPress | Tagged , , , | 2 Comments

A Shorter Ternary Operator in PHP 5.3

The ternary operator is simply awesome. It allows for some really beautiful if-else style variable assignments: $can_drink = ( $age <= 21 ) ? true : false ; This operator let’s you evaluate a condition, and return one of two … Continue reading

Posted in PHP | Tagged , , | 2 Comments

Quickly Adding Thumbnails to WordPress Archives

Post thumbnails make archives look much more attractive in my personal opinion, yet they are not natively displayed in the otherwise-beautiful theme shipped with the latest version of WordPress, Twenty Ten. As is the case with most WordPress stuff, this … Continue reading

Posted in Uncategorized, WordPress | Tagged , , , , | 2 Comments

Install and Setup of Kohana 3, The

Kohana is the wildly popular PHP Framework used by many developers all over. I’ve used it numerous times in the past on some rather different projects and found it to be pretty versatile and reliable over-all. One of my largest … Continue reading

Posted in Kohana, Uncategorized | Tagged , , , , , | 1 Comment