<?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: help with postheader_postmeta filter</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Thu, 20 Jun 2013 09:51:13 +0000</pubDate>

<item>
<title>JC on "help with postheader_postmeta filter"</title>
<link>http://themeshaper.com/forums/topic/help-with-postheader_postmeta-filter#post-13677</link>
<pubDate>Mon, 05 Jul 2010 22:58:06 +0000</pubDate>
<dc:creator>JC</dc:creator>
<guid isPermaLink="false">13677@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thank you  Chris !&#60;br /&#62;
As you noticed I'm no good at php, and  I somehow had a feeling  my code was uggly   ;-)&#60;br /&#62;
..  and it works great  by the way !
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "help with postheader_postmeta filter"</title>
<link>http://themeshaper.com/forums/topic/help-with-postheader_postmeta-filter#post-13662</link>
<pubDate>Sun, 04 Jul 2010 21:20:42 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">13662@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;this is pretty close to perfect .. without testing:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// Put date first in postheader
function childtheme_postheader_postmeta($postmeta) {
  if (is_single()) { // only for single post
    $postmeta = &#38;#39;&#38;lt;div class=&#38;quot;entry-meta&#38;quot;&#38;gt;&#38;#39;;
    $postmeta .= thematic_postmeta_entrydate(); //the date first
    $postmeta .= &#38;#39;&#38;lt;span class=&#38;quot;meta-sep meta-sep-entry-date&#38;quot;&#38;gt; &#124; &#38;lt;/span&#38;gt;&#38;#39;;
    $postmeta .= thematic_postmeta_authorlink();

    $postmeta .= thematic_postmeta_editlink();

    $postmeta .= &#38;quot;&#38;lt;/div&#38;gt;&#38;lt;!-- .entry-meta --&#38;gt;\n&#38;quot;;
    }

    return $postmeta; 

} // end childtheme_postheader_postmeta
add_filter(&#38;#39;thematic_postheader_postmeta&#38;#39;, &#38;#39;childtheme_postheader_postmeta&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This will keep the original already created data (see $postmeta in the function line), if it is not a single post. Otherwise it'll create your data. This code is a bit faster. :)&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "help with postheader_postmeta filter"</title>
<link>http://themeshaper.com/forums/topic/help-with-postheader_postmeta-filter#post-13661</link>
<pubDate>Sun, 04 Jul 2010 21:20:10 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">13661@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;this is pretty close to perfect .. without testing:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// Put date first in postheader
function childtheme_postheader_postmeta($postmeta) {
  if (is_single()) { // only for single post
    $postmeta = &#38;#39;&#38;lt;div class=&#38;quot;entry-meta&#38;quot;&#38;gt;&#38;#39;;
    $postmeta .= thematic_postmeta_entrydate(); //the date first
    $postmeta .= &#38;#39;&#38;lt;span class=&#38;quot;meta-sep meta-sep-entry-date&#38;quot;&#38;gt; &#124; &#38;lt;/span&#38;gt;&#38;#39;;
    $postmeta .= thematic_postmeta_authorlink();

    $postmeta .= thematic_postmeta_editlink();

    $postmeta .= &#38;quot;&#38;lt;/div&#38;gt;&#38;lt;!-- .entry-meta --&#38;gt;\n&#38;quot;;
    }

    return $postmeta; 

} // end childtheme_postheader_postmeta
add_filter(&#38;#39;thematic_postheader_postmeta&#38;#39;, &#38;#39;childtheme_postheader_postmeta&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This will keep the original already created data (see $postmeta in the function line), if it is not a single post. Otherwise it'll create your data. This code is a bit faster. :)&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>JC on "help with postheader_postmeta filter"</title>
<link>http://themeshaper.com/forums/topic/help-with-postheader_postmeta-filter#post-13659</link>
<pubDate>Sun, 04 Jul 2010 14:14:32 +0000</pubDate>
<dc:creator>JC</dc:creator>
<guid isPermaLink="false">13659@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thank you again  Helga,  I'm no good at  logic,   but your  guessing  was exact :&#60;br /&#62;
This  did the trick  for me :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// Put date first in postheader
function childtheme_postheader_postmeta() {
	$postmeta = &#38;#39;&#38;lt;div class=&#38;quot;entry-meta&#38;quot;&#38;gt;&#38;#39;;
    $postmeta .= thematic_postmeta_authorlink();
    $postmeta .= &#38;#39;&#38;lt;span class=&#38;quot;meta-sep meta-sep-entry-date&#38;quot;&#38;gt; &#124; &#38;lt;/span&#38;gt;&#38;#39;;
    $postmeta .= thematic_postmeta_entrydate();

    $postmeta .= thematic_postmeta_editlink();

    $postmeta .= &#38;quot;&#38;lt;/div&#38;gt;&#38;lt;!-- .entry-meta --&#38;gt;\n&#38;quot;; 

  if (is_single()) { // only for single post
    $postmeta = &#38;#39;&#38;lt;div class=&#38;quot;entry-meta&#38;quot;&#38;gt;&#38;#39;;
    $postmeta .= thematic_postmeta_entrydate(); //the date first
    $postmeta .= &#38;#39;&#38;lt;span class=&#38;quot;meta-sep meta-sep-entry-date&#38;quot;&#38;gt; &#124; &#38;lt;/span&#38;gt;&#38;#39;;
    $postmeta .= thematic_postmeta_authorlink();

    $postmeta .= thematic_postmeta_editlink();

    $postmeta .= &#38;quot;&#38;lt;/div&#38;gt;&#38;lt;!-- .entry-meta --&#38;gt;\n&#38;quot;;
    }

    return $postmeta; 

} // end childtheme_postheader_postmeta
add_filter(&#38;#39;thematic_postheader_postmeta&#38;#39;, &#38;#39;childtheme_postheader_postmeta&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Cheers !
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "help with postheader_postmeta filter"</title>
<link>http://themeshaper.com/forums/topic/help-with-postheader_postmeta-filter#post-13655</link>
<pubDate>Sun, 04 Jul 2010 13:04:57 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">13655@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;2 problems that i think i see.  first you are only 'returning' the $mypostmeta variable in the is_single() if statement, so nothing will get returned on any other page.  Also you are not returning $postmeta at all, which is why it is blank on the other pages.  try this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// Put date first in postheader
function childtheme_postheader_postmeta() {
if (is_single()) { // only for single post
    $postmeta = &#38;#39;&#38;lt;div class=&#38;quot;entry-meta&#38;quot;&#38;gt;&#38;#39;;
    $postmeta .= thematic_postmeta_entrydate();
    $postmeta .= thematic_postmeta_authorlink();
    $postmeta .= &#38;#39;&#38;lt;span class=&#38;quot;meta-sep meta-sep-entry-date&#38;quot;&#38;gt; &#124; &#38;lt;/span&#38;gt;&#38;#39;;

    $postmeta .= thematic_postmeta_editlink();

    $postmeta .= &#38;quot;&#38;lt;/div&#38;gt;&#38;lt;!-- .entry-meta --&#38;gt;\n&#38;quot;;
    }
    return $postmeta;

} // end childtheme_postheader_postmeta
add_filter(&#38;#39;thematic_postheader_postmeta&#38;#39;, &#38;#39;childtheme_postheader_postmeta&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>JC on "help with postheader_postmeta filter"</title>
<link>http://themeshaper.com/forums/topic/help-with-postheader_postmeta-filter#post-13652</link>
<pubDate>Sun, 04 Jul 2010 11:36:41 +0000</pubDate>
<dc:creator>JC</dc:creator>
<guid isPermaLink="false">13652@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hello everybody !&#60;/p&#62;
&#60;p&#62;I need to change display order  for postheader_postmeta information (I need to have the date  first) but ONLY for single post  view  (not home/blog etc..)  so  I tried  with this following  code  without success.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// Put date first in postheader
function childtheme_postheader_postmeta() {
if (is_single()) { // only for single post
    $mypostmeta = &#38;#39;&#38;lt;div class=&#38;quot;entry-meta&#38;quot;&#38;gt;&#38;#39;;
    $mypostmeta .= thematic_postmeta_entrydate();
    $mypostmeta .= thematic_postmeta_authorlink();
    $mypostmeta .= &#38;#39;&#38;lt;span class=&#38;quot;meta-sep meta-sep-entry-date&#38;quot;&#38;gt; &#124; &#38;lt;/span&#38;gt;&#38;#39;;

    $mypostmeta .= thematic_postmeta_editlink();

    $mypostmeta .= &#38;quot;&#38;lt;/div&#38;gt;&#38;lt;!-- .entry-meta --&#38;gt;\n&#38;quot;;

    return $mypostmeta;
    }
} // end childtheme_postheader_postmeta
add_filter(&#38;#39;thematic_postheader_postmeta&#38;#39;, &#38;#39;childtheme_postheader_postmeta&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The problem is that the above  code works ok when it's a single post,  but when it's not   the postheader_postmeta info desappears  (nothing is displayed)  instead of being displayed with the default order.&#60;/p&#62;
&#60;p&#62;Could someone be kind to help me ?&#60;br /&#62;
thank you !
&#60;/p&#62;</description>
</item>

</channel>
</rss>
