<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: How to add post-format classes to Thematic's body classes</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Wed, 22 May 2013 08:12:20 +0000</pubDate>

<item>
<title>notlaura on "How to add post-format classes to Thematic's body classes"</title>
<link>http://themeshaper.com/forums/topic/how-to-add-post-format-classes-to-thematics-body-classes#post-20728</link>
<pubDate>Wed, 20 Apr 2011 13:31:02 +0000</pubDate>
<dc:creator>notlaura</dc:creator>
<guid isPermaLink="false">20728@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I had a very hard time getting post formats to function in my child theme. Finally got them working thanks to &#60;a href=&#34;http://wordpress.stackexchange.com/questions/12420/post-format-selector-in-thematic-child-theme-post-class/15067#15067&#34;&#62;my post on WPAnswers&#60;/a&#62; -  I hope this helps anyone who is having the same/similar issues!&#60;/p&#62;
&#60;p&#62;In sum, it seems that the Thematic body class does not include the &#60;code&#62;.format-$format&#60;/code&#62; selectors even when post formats have been enabled. I tried &#60;code&#62;child_theme_override_post_class()&#60;/code&#62; to remove &#60;code&#62;thematic_post_class&#60;/code&#62; but to no avail - although the &#60;code&#62;post_class&#60;/code&#62; echoed instead of &#60;code&#62;thematic_post_class&#60;/code&#62; and did contain the &#60;code&#62;.format&#60;/code&#62; class, the style in the selectors was not read. So, the selector had to be manually added to &#60;code&#62;post_class&#60;/code&#62; in &#60;code&#62;functions.php&#60;/code&#62; like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_thematic_post_format_class( $classes = array() ) {
  $format = get_post_format();
  if ( &#38;#39;&#38;#39; == $format )
    $format = &#38;#39;standard&#38;#39;;

  $classes[] = &#38;#39;format-&#38;#39; . $format;

  return $classes;
}

add_filter( &#38;#39;post_class&#38;#39;, &#38;#39;my_thematic_post_format_class&#38;#39; );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;From what I gathered, Twenty-Ten does it something like this which did not work for me:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_add_format_support() {
    add_theme_support( &#38;#39;post-formats&#38;#39;, array( &#38;#39;aside&#38;#39;, &#38;#39;gallery&#38;#39;, &#38;#39;link&#38;#39;, &#38;#39;image&#38;#39;) );
}
add_action(&#38;#39;after_setup_theme&#38;#39;, &#38;#39;my_add_format_support&#38;#39;, 11);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Perhaps the &#60;code&#62;.format&#60;/code&#62; class should be added to &#60;code&#62;thematic_post_class&#60;/code&#62;? And @anyone more experienced than me, is there a better way to do this?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
