WordPress/jQuery Best Practices

I’ve spent a lot of time recently fixing bugs that other developers have left floating around.  Here’s a quick how-to on preventing those bugs. 1. Use wp_enqueue_script() in your WordPress themes When you write a WordPress theme, you’re bound to use a number of snippets of JavaScript to accomplish different things.  But just how should you embed that JavaScript?  I thought (incorrectly) for a long time that you could simply include the <script> tag between the <head></head> tags and reference the script: <head> <script type=”text/javascript” src=”<? bloginfo(‘template_url’) ?>/js/myscript.js”></script> </head> Well, let me tell you, folks, that doing it that way just won’t cut the muster.  Why?  Well, what happens if you do this: <head> <script type=”text/javascript” src=”<? bloginfo(‘template_url’) ?>/js/my.jquery.js”></script> <script… [Read More]

WP eCommerce Image Gallery

I recently had a client who wanted the product gallery on his WP eCommerce install to just change the main product image instead of using thickbox.  I wrote a simple wordpress plugin that simply prevents thickbox from loading and adds a new handler for the thumbnails that simply switches out the main product image. This plugin still requires the WP eCommerce Gold Cart to enable the image gallery in the first place. Download WPeC ImageFadr Plugin

IE9 – Thanks?

So, rumor has it that Microsoft is supposed to release Internet Explorer 9, and quite frankly it looks awesome.  Although I’m not generally too big on Microsoft, I must say, they seem to have the ticket this time.  According to the IE9 Platform Demo page and the IE9 Testing Center, IE9 will fully support HTML5, CSS3, and have a working DOM.  This is great news; I mean really, I could actually create a web site that didn’t need backward-compatibility for IE.  Great! Now if only I can get my userbase to update… but I can’t.   You see, while IE9 really, truly sounds wonderful, Microsoft isn’t going to support any version of windows prior to Vista Service Pack 2.  So in… [Read More]

What does a “Basic Website” cost?

I get asked this question almost every day of my life, usually with no further clarification or direction.  I’m not sure why people ask, since no one who uses this question seems to have any legitimate interest whatsoever in hiring me, but it continues to pop up so I’m going to attempt to address it.  Here’s how it begins: Someone Else:  So, what do you do? Me: I’m a web developer. Someone Else: Oh, that must be fun.  So, what does a basic website cost? Me: What do you mean by basic website? Someone Else: Oh, you know, just something simple – you know, a basic website. Let’s just stop there.  I can only assume that this question is an… [Read More]