DiggingIntoWordPress

by Chris Coyier & Jeff Starr

Tag: JavaScript

Making an Expanding Code Box

Posted by on

On blogs that like to share snippets of code like this one, it is common to use the <pre> tag to wrap the code so that the spacing/indenting is maintained and long lines do not wrap. While this is desirable behavior, it can be undesirable to have those un-wrapped lines break out of their containers awkwardly and overlap other content.

Create a Stunning Lightbox-Style Random-Post Header Gallery

Posted by on

In this tutorial, we’re going to take advantage of two of WordPress’ most powerful features, get_posts() and custom fields, to create a stunning random lightbox-style header gallery for your post images. Displayed before the standard post loop, this lightbox gallery will randomly display the images that are associated with your posts while also providing a descriptive title link to the post itself. Here is a graphical representation that will help us visualize what we are going to do:

Code is poetry