Posts Filed as Web Dev

Shortcode to show all files attached to post as list [showfiles]

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&…

Read the Full Article

WordPress Function to change Background to Featured Image

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…

Read the Full Article

jQuery Resizer! – resize objects that are greater than a specified width

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…

Read the Full Article

Make iframes load after page content (with jQuery)

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…

Read the Full Article

Quick demo of the CSS Extractor for WordPress Comments

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.

Read the Full Article

New Tool: CSS from HTML

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…

Read the Full Article

How to add multiple pages at once with WordPress

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…

Read the Full Article

How to Quickly Create Reusable Color Palettes in TextMate

Below is a quick video tutorial of using Mac OS’ built-in color picker to create color palletes for use in your CSS documents.

Read the Full Article

Using CSS Media Queries

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…

Read the Full Article