<?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: Put Comment in DIV</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Sat, 18 May 2013 18:50:03 +0000</pubDate>

<item>
<title>bogh on "Put Comment in DIV"</title>
<link>http://themeshaper.com/forums/topic/put-comment-in-div#post-26685</link>
<pubDate>Fri, 27 Apr 2012 16:58:17 +0000</pubDate>
<dc:creator>bogh</dc:creator>
<guid isPermaLink="false">26685@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I found my answer in library/extensions/discussion.php&#60;/p&#62;
&#60;p&#62;And I have made it like that:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function open_com() { ?&#38;gt;&#38;lt;div class=&#38;quot;blablabla&#38;quot;&#38;gt;&#38;lt;?php }
add_action(&#38;#39;thematic_abovecomment&#38;#39;,&#38;#39;open_com&#38;#39;,0);

function close_com() { ?&#38;gt;&#38;lt;/div&#38;gt;&#38;lt;?php }
add_action(&#38;#39;thematic_belowcomment&#38;#39;,&#38;#39;close_com&#38;#39;,0);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Thank you.
&#60;/p&#62;</description>
</item>
<item>
<title>bogh on "Put Comment in DIV"</title>
<link>http://themeshaper.com/forums/topic/put-comment-in-div#post-26684</link>
<pubDate>Fri, 27 Apr 2012 16:05:58 +0000</pubDate>
<dc:creator>bogh</dc:creator>
<guid isPermaLink="false">26684@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I am trying to put each comment into a DIV&#60;/p&#62;
&#60;p&#62;The only way I've found is that:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;// Custom callback to list comments in the Thematic style
function mytheme_comments($comment, $args, $depth) {
$GLOBALS[&#38;#39;comment&#38;#39;] = $comment;
$GLOBALS[&#38;#39;comment_depth&#38;#39;] = $depth;
?&#38;gt;
&#38;lt;li id=&#38;quot;comment-&#38;lt;?php comment_ID() ?&#38;gt;&#38;quot; class=&#38;quot;&#38;lt;?php thematic_comment_class() ?&#38;gt;&#38;quot;&#38;gt;

//START Opening DIV
&#38;lt;div&#38;gt;
//END Opening DIV

&#38;lt;div class=&#38;quot;comment-author vcard&#38;quot;&#38;gt;&#38;lt;?php thematic_commenter_link() ?&#38;gt;&#38;lt;/div&#38;gt;
&#38;lt;div class=&#38;quot;comment-meta&#38;quot;&#38;gt;&#38;lt;?php printf(__(&#38;#39;%1$s&#38;#39;, &#38;#39;thematic&#38;#39;),
get_comment_date() ); ?&#38;gt;&#38;lt;/div&#38;gt;
&#38;lt;?php if ($comment-&#38;gt;comment_approved == &#38;#39;0&#38;#39;) _e(&#38;quot;\t\t\t\t\t&#38;lt;span class=&#38;#39;unapproved&#38;#39;&#38;gt;Your comment is awaiting moderation.&#38;lt;/span&#38;gt;\n&#38;quot;, &#38;#39;thematic&#38;#39;) ?&#38;gt;
&#38;lt;div class=&#38;quot;comment-content&#38;quot;&#38;gt;
&#38;lt;?php comment_text() ?&#38;gt;
&#38;lt;/div&#38;gt;
&#38;lt;?php
if($args[&#38;#39;type&#38;#39;] == &#38;#39;all&#38;#39; &#124;&#124; get_comment_type() == &#38;#39;comment&#38;#39;) :
comment_reply_link(array_merge($args, array(
&#38;#39;reply_text&#38;#39; =&#38;gt; __(&#38;#39;Reply&#38;#39;,&#38;#39;thematic&#38;#39;),
&#38;#39;login_text&#38;#39; =&#38;gt; __(&#38;#39;Log in to reply.&#38;#39;,&#38;#39;thematic&#38;#39;),
&#38;#39;depth&#38;#39; =&#38;gt; $depth,
&#38;#39;before&#38;#39; =&#38;gt; &#38;#39;&#38;lt;div class=&#38;quot;comment-reply-link&#38;quot;&#38;gt;&#38;#39;,
&#38;#39;after&#38;#39; =&#38;gt; &#38;#39;&#38;lt;/div&#38;gt;&#38;#39;

)));
endif;
?&#38;gt;

//START Closing DIV
&#38;lt;div&#38;gt;
//END Closing DIV

&#38;lt;?php }

function my_callback() {
$content = &#38;#39;type=comment&#38;#38;callback=mytheme_comments&#38;#39;;
return $content;
}
add_filter(&#38;#39;list_comments_arg&#38;#39;, &#38;#39;my_callback&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I just want to add the Opening DIV and the Closing Div, to the post's content, just like above, but without rewriting the post's content.&#60;br /&#62;
Please tell me that is possible :)&#60;/p&#62;
&#60;p&#62;Maybe something like below:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;// Add Header DIVs
function open_header() { ?&#38;gt;&#38;lt;div&#38;gt;&#38;lt;?php }
add_action(&#38;#39;thematic_header&#38;#39;,&#38;#39;open_header&#38;#39;,0);

function close_header() { ?&#38;gt;&#38;lt;/div&#38;gt;&#38;lt;?php }
add_action(&#38;#39;thematic_header&#38;#39;,&#38;#39;close_header&#38;#39;,11);&#60;/code&#62;&#60;/pre&#62;</description>
</item>

</channel>
</rss>
