Post Formats in Thematic Child
-
Following the format from this post, 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?
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Post Formats in Thematic Child’ is closed to new replies.