WordPress CMS: testimonials, custom fields, and random posts

Today I had to set up a way to organize and publish the content of customer testimonials. Excerpts from these testimonials were going to appear in the left column of the page, in addition to being able to viewed in their entirety. So the designer of the site and I both agreed they should be Posts, submitted within a Testimonial category.

On the page where the testimonial should appear, the client would have the option of getting a specific Testimonial to appear in the left column. However, if the client forgot to specify a Testimonial post, then a random testimonial would appear instead.

Here is the code that went in index.php… Continue reading

Posted in PHP, Web Development, WordPress | Leave a comment

Sections of a WordPress Site

Sometimes it’s useful to know whether the current post or page is within a specified hierarchical section of the site.

For example, I may have a page on my site called “Super Funky”, and some child pages dedicated to James Brown, Sly Stone, Parliament-Funkadelic, etc. On these pages, I have some special code that prevents them from uncontrollably getting down on the dancefloor… but the question is, how do we set up the logic that will check whether we are within the Super Funky section of the site? Continue reading

Posted in PHP, Web Development, WordPress | Leave a comment

Default WordPress Video

Some comparisons of the stock video functionality, using the “Add Video” button above the editing window in WP 2.8. Continue reading

Posted in Uncategorized | Leave a comment

YouTube Lightbox Embedding

Here is a YouTube Flash video player that is viewed within the ever-popular “lightbox effect”. To achieve this, I am using iBox, which is freely available as a simple JavaScript file or as a WordPress plugin. Since this is within my blog, I chose the WordPress version.

iBox allows me to use a link to a YouTube video.  In this case, I wanted my link to look like a video clip, so I used Grab on my MacBook to get an image of the video player on my YouTube player test page.

That worked fine, but to prevent those “related videos” from popping up at the end of the playback, I had to edit the iBox JavaScript file. Basically, I had to update the HTML string that would be dynamically added to the DOM to bring it inline with YouTube’s current recommendations for modifying the player. And then I had to tweak the player. Continue reading

Posted in Web Development, Web Video | Leave a comment

YouTube Player Tests

In this post, I am testing various ways of embedding a YouTube Player.

For the super-customized chromeless player, please visit the chromeless player page. Continue reading

Posted in Web Development, Web Video | 1 Comment

Scope issues with the callback to JQuery’s animate() function

The fine folks over at the JQuery Google Group helped me solve this problem.

I wanted to create an animation with JQuery’s animate() function, but I did not want to use setTimeout(). My reasoning for this was that setTimeout() can only call functions that are within the global namespace, and I try to avoid anything global for all the well-documented reasons.  I thought about using call() to change the invocation context, but setTimeout.call(object) will not work, because setTimeout() returns void.

So I was going to use the callback within animate() to synchronously loop back and continue the animation.  But I could not find a way to reference the original context of the function where animate() gets called.  Perhaps some code would explain this better… Continue reading

Posted in JQuery, JavaScript, Web Development | Leave a comment


I have to add my voice to the chorus of folks who love this merchandise design from Steven Frank. Continue reading

Posted in Web Design, Web Development, humor | Tagged , , | Leave a comment

Trapped Inside a WordPress Universe

You can’t embed WordPress into a page, I read here. Continue reading

Posted in Web Development | Tagged , , , | Leave a comment