Here’s the code: // [showfiles] function dump_files($atts) { extract(shortcode_atts(array(), $atts)); global $post; $return = ''; $children = get_children( 'numberposts=-1&orderby=menu_order&order=ASC&post_type=attachment&…
I needed this functionality, and decided to create a function. Since it was so easily digestable, I figured I’d just post it here. Here’s the function function set_post_background() { global $post; $bgimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID…
Today I launched the new design of Escape From Cubicle Nation, which I’m very proud to have worked on. Props to Brian Morykon for the design, Joseph Hinson for the code. My last order of business in coding the site was that some of the Youtube videos and embeds had been inserted at a width of 640 pix…
In my work I create a lot of WordPress sites for my clients, and often times we’ll put the share links and social proof in the footer of each post. Some time ago, facebook introduced the like button for public use with iframes, which makes it very easy to incorporate just about anywhere, the only p…
Below is a quick video that shows how the CSS Extractor tool can be used to quickly pull css classes from your site’s markup, specifically with the WordPress comments, that are generated dynamically.
This tool parses your HTML and pulls out your CSS classes and IDs. It then presents you with a css file download containing all classes and ids used in your markup. It’s helpful for creating handles in your CSS file, then manipulating them in Firebug. Thanks to my buddy Adeel for help creating th…
I have since written a plugin for this purpose, you may read about it here: WordPress Plugin: Quick Posts Ok folks, this will be short. If you want to add several pages at once, I created a little script for you. Here it is: <?php include ('wp-blog-header.php'); $newPages = array( 'Page 1' => 'Lo…
Below is a quick video tutorial of using Mac OS’ built-in color picker to create color palletes for use in your CSS documents.
I wanted my website to be a little easier to read in the iPhone. I knew there was a new CSS3 property called Media Queries. This allows you to discriminate based on window size. So, in the header, as I would normally pull in a stylesheet, I can say: And that will pull in a stylesheet for the iPhone, mine look…