Add Columns to Your Posts!

The Death of the Boring Blog Post – Easily Add Columns to Any WordPress Post

Smashing Magazine recently published a wonderful post “The Death of the Boring Blog Post” which touches more or less on what I shared the other day – multiple post templates. Today we’re going to expand on that tutorial (except this is the really easy way).
It was watching a screencast on Nettuts the other day that inspired this post. Jeffrey Way was showing how to change the background of a post with custom fields (which is yet another example of the brilliance of the things!) when he shows a demo on his personal test area. The test area is a framework called “Flexible-WP”. I have no idea what it’s designed to do, but looking at a post, this is a pretty neat idea. Set some styling and use divs within posts to put posts into columns.
Here’s an example. Jeffrey has a grid. This grid can then be applied within posts just by going into the HTML editor in WordPress and adding a div around some text:-


A paragraph of interesting text.
A paragraph of more interesting text.

And then you’d have two bits of text which would be in columns next to each other. Clever, no?

Implementation

Implementation of this is actually quite simple. You’ll need a grid. If you’re using a theme based on a framework, it’s quite probably got the 960 grid system built in, in which case you can use that. If not, open up your style.css file and either create your own or use something similar to the below which Jeffrey uses on his site:

.g1 { width: 60px; margin-left: 10px; margin-right: 10px; float: left; display: inline; }
.g2 { width: 140px; margin-left: 10px; margin-right: 10px; float: left; display: inline; }
.g3 { width: 220px; margin-left: 10px; margin-right: 10px; float: left; display: inline;}
.g4 { width: 300px; margin-left: 10px; margin-right: 10px; float: left; display: inline; }
.g5 { width: 380px; margin-left: 10px; margin-right: 10px; float: left; display: inline; }
.g6 { width: 460px; margin-left: 10px; margin-right: 10px; margin-bottom: 20px; float: left; display: inline; }
.g7 { width: 540px; margin-left: 10px; margin-right: 10px; float: left; display: inline; }
.g8 { width: 620px; margin-left: 10px; margin-right: 10px; float: left; display: inline; }
.g9 { width: 700px; margin-left: 10px; margin-right: 10px; margin-bottom: 20px; float: left; display: inline; }
.g10 { width: 780px; margin-left: 10px; margin-right: 10px; float: left; display: inline; }
.g11 { width: 860px; margin-left: 10px; margin-right: 10px; float: left; display: inline; }
.g12 { width: 940px; margin-left: 10px; margin-right: 10px; float: left; display: inline; }

And then when writing, you can utilise your grid by wrapping text as I show above. A really easy (and effective) to make your blog post that bit more unique and exciting.

You should follow me on Twitter

Related Posts

Best Practices for Creating Unique Blog Posts

Best Practices for Creating Unique Blog Posts


Single Post Templates Made Easy

Single Post Templates Made Easy


Display Quotes From A Random Post

How To: Display Quotes From A Random Post in WordPress


WPShift

2 Comments - Add Yours!

Post a Comment

Please take not of the comment policy.

Your email is never published nor shared.

*
*
User Gravatar