Carrington & Polaroid gallery

I suppose a good way to start off this post would be to talk about the design of this blog. Its based on WordPress, incase you didn’t know. I usually develop with Drupal, but since this site was always meant to be about blogging, it seemed overkill to use something as powerful as Drupal for a blog. Also the blogging in Drupal is obviously not as good as a platform developed for blogging!

I installed Polaroid widgets to give some cool style to my photos. This works great, however it didn’t work quite this way when I installed the theme I am using. So I’ll explain below how I got it working.

I am using the Carringdon theme¬†on the site, which I modified to look the way I wanted it through the CSS files. After installing the Polaroid gallery, I found that the images didn’t quite display the way I wanted them to.

The wrong way to display a galleryThis is the way I want gallerys displayed!

This is not the way I wanted my photos displayed, it looks less than pants. So I had a little poke around and found the code in Carrington which displays the gallery. The function is called cfct_post_gallery() and you can find it in attatchment.php in the carrington_core folder. You want to remove this code and replace it with the code below, which I took from WordPress’ twenty eleven theme. It works for me, so I guess it should for everyone! Enjoy.

<?php //ignore the tag above, its in here for the benefit of the blog colouring. function cfct_post_gallery($unused, $attr) {
?><article id="post-<?php the_ID(); ?>" post_class="" php="">&gt;<header class="entry-header"><hgroup>
<h2 class="entry-title"></h2>
<h3 class="entry-format"></h3>
</hgroup><!-- .entry-meta --></header><!-- .entry-header --> <?php if ( is_search() ) : // Only display Excerpts for search pages ?><!-- .entry-summary --> <?php else : ?><!-- .entry-content --> <?php endif; ?><footer class="entry-meta"><?php $show_sep = false; ?> <?php 
			/* translators: used between list items, there is a space after the comma */
			$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
			if ( $categories_list ):
		?> <?php endif; // End if categories ?> <?php 
			/* translators: used between list items, there is a space after the comma */
			$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
			if ( $tags_list ):
			if ( $show_sep ) : ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <?php endif; // End if $tags_list ?> <?php if ( comments_open() ) : ?> <?php if ( $show_sep ) : ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <?php endif; // End if comments_open() ?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?></footer><!-- #entry-meta --></article>

<!-- #post-<?php the_ID(); ?> --><?php 
}
?>