I was reading another thread,Strategy, Function for WP 3.1 Post Formats in Thematic, but thought support questions would be better suited to a new topic.
I've been testing post formats in a Thematic child theme and added this to functions.php:
// Enable a few post formats
add_theme_support( 'post-formats', array( 'gallery', 'image', 'link') );
// Post formats function
function wpfolio_post_formats() {
if ( has_post_format( 'gallery' )) {
echo '<div class="gallery-format">';
echo the_content();
echo '</div>';
} else if ( has_post_format( 'image' )) {
echo '<div class="image-format">';
echo the_content();
echo '</div>';
} else if ( has_post_format( 'link' )) {
echo '<div class="link-format">';
echo the_content();
echo '</div>';
}
...
else {
echo the_content();
}
}
add_action('thematic_post', 'wpfolio_post_formats');
This works but is pretty limited - it seems I can't style the post header and footer without adding more functions and filters with their own sets of conditions.
With reference to this post I've tried to use the .format-image classes instead by adding them to the stylesheet and replacing my above classes with this:
echo '<div id="post-<?php post_ID(); ?>" <?php post_class(); ?>';
No luck - the style disappears completely. Any ideas? How have you used post formats in Thematic?