Upgraded to WordPress 2.6, do I need to upgrade my theme??

A caption below an image looks neat
A caption below an image looks neat
Every few days, the guys at wordpress.org come up with an upgrade to their brainchild, the WordPress blogging platform. Last week they launched wordpress 2.6. With every new release, most of us upgrade our WP installations immediately but have we ever modified our themes before? If you upgraded to wordpress 2.6, you do need to upgrade your theme.

WP2.6 gave us the feature to use captions for our images. I tried using these captions and they just wouldn’t show up. The captions looked like plain text. Then it struck me. The CSS needs to be modified to facilitate captions. Here’s what you can try out.

Open your Stylesheet (style.css) for the theme you are currently using and pasted the following code into it. Place it anywhere in the CSS file and it should work.

/**************************/
/* Captions (WordPress 2.6 stuff) */
/**************************/
.aligncenter,
div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}

.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}

.wp-caption img {
margin: 0;
padding: 0;
border: 0 none;
}

.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
padding: 0 4px 5px;
margin: 0;
}
/* www.angadsodhi.com */
/* End captions */

Change the value of background-color to whatever you wish. f3f3f3 is a cool blue which looks great for captions. On the top of this post, you can see an image with a caption below it. Neat huh!

9 thoughts on “Upgraded to WordPress 2.6, do I need to upgrade my theme??

Leave a Reply

Your email address will not be published. Required fields are marked *