<?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>WordPress &#8250; Support Topic: show post dates, but list year only once?</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: show post dates, but list year only once?</description>
<language>en</language>
<pubDate>Tue, 24 Nov 2009 06:27:05 +0000</pubDate>

<item>
<title>gmisen on "show post dates, but list year only once?"</title>
<link>http://wordpress.org/support/topic/236860#post-967299</link>
<pubDate>Mon, 26 Jan 2009 22:00:20 +0000</pubDate>
<dc:creator>gmisen</dc:creator>
<guid isPermaLink="false">967299@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Actually, I take that back. On my computer it looks fine. On my coworker's PC the post content does not show up (or on my mac when i use my Firebug firefoxplugin on the page).&#60;br /&#62;
The dates show up but the content won't. I was hoping this wouldn't be too complicated for a browser to handle. (this is the first of three loops on a page)&#60;/p&#62;
&#60;p&#62;Can anyone tell what I'm doing wrong?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;div class=&#38;quot;hr&#38;quot;&#38;gt;&#38;lt;hr /&#38;gt;&#38;lt;/div&#38;gt;
&#38;lt;a name=&#38;quot;timeline&#38;quot;&#38;gt;&#38;lt;/a&#38;gt;

&#38;lt;div class=&#38;quot;presspost&#38;quot; valign=&#38;quot;top&#38;quot; id=&#38;quot;post-&#38;lt;?php the_ID(); ?&#38;gt;&#38;quot;&#38;gt;
&#38;lt;div class=&#38;quot;pressentry&#38;quot;&#38;gt;

&#38;lt;p class=&#38;quot;about_caption2&#38;quot;&#38;gt;&#38;lt;a name=&#38;quot;Timeline&#38;quot;&#38;gt;&#38;lt;/a&#38;gt;Company History&#38;lt;/p&#38;gt;
&#38;lt;table class=&#38;quot;timeline&#38;quot; border=&#38;quot;0&#38;quot;&#38;gt;
&#38;lt;tbody&#38;gt;

&#38;lt;?php $my_query = new WP_Query(&#38;#39;category_name=timeline&#38;#38;showposts&#38;#39;);
while ($my_query-&#38;gt;have_posts()) : $my_query-&#38;gt;the_post(); ?&#38;gt;

&#38;lt;tr&#38;gt;
&#38;lt;td class=&#38;quot;namendate3&#38;quot; width=&#38;quot;34&#38;quot;&#38;gt;

&#38;lt;?php if (mysql2date(&#38;quot;Y&#38;quot;, $post-&#38;gt;post_date) != $year) {
$year = mysql2date(&#38;quot;Y&#38;quot;, $post-&#38;gt;post_date);
$count=1;
} if ($count == 1) {echo &#38;quot;&#38;lt;br /&#38;gt;&#38;quot;; the_time(&#38;#39;Y&#38;#39;);} $count++; ?&#38;gt;

&#38;lt;/td&#38;gt;

&#38;lt;tr&#38;gt;
&#38;lt;td class=&#38;quot;namendate2&#38;quot;&#38;gt;

&#38;lt;?php the_time(&#38;#39;M&#38;#39;) ?&#38;gt;

&#38;lt;/td&#38;gt;

&#38;lt;td&#38;gt;

&#38;lt;?php the_content(&#38;#39;&#38;lt;p class=&#38;quot;serif&#38;quot;&#38;gt;Read the rest of this page &#38;amp;raquo;&#38;lt;/p&#38;gt;&#38;#39;); ?&#38;gt;

&#38;lt;?php wp_link_pages(array(&#38;#39;before&#38;#39; =&#38;gt; &#38;#39;&#38;lt;p&#38;gt;&#38;lt;strong&#38;gt;Pages:&#38;lt;/strong&#38;gt; &#38;#39;, &#38;#39;after&#38;#39; =&#38;gt; &#38;#39;&#38;lt;/p&#38;gt;&#38;#39;, &#38;#39;next_or_number&#38;#39; =&#38;gt; &#38;#39;number&#38;#39;)); ?&#38;gt;

&#38;lt;/td&#38;gt;
&#38;lt;/tr&#38;gt;

&#38;lt;?php endwhile; ?&#38;gt;

&#38;lt;/tbody&#38;gt;
&#38;lt;/table&#38;gt;

&#38;lt;br /&#38;gt;
&#38;lt;br /&#38;gt;

&#38;lt;p align=&#38;quot;right&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;#top&#38;quot;&#38;gt;back to top&#38;lt;/a&#38;gt;&#38;lt;/p&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>gmisen on "show post dates, but list year only once?"</title>
<link>http://wordpress.org/support/topic/236860#post-967287</link>
<pubDate>Mon, 26 Jan 2009 21:44:28 +0000</pubDate>
<dc:creator>gmisen</dc:creator>
<guid isPermaLink="false">967287@http://wordpress.org/support/</guid>
<description>&#60;p&#62;woah thanks! that worked nicely
&#60;/p&#62;</description>
</item>
<item>
<title>MichaelH on "show post dates, but list year only once?"</title>
<link>http://wordpress.org/support/topic/236860#post-964653</link>
<pubDate>Fri, 23 Jan 2009 22:01:14 +0000</pubDate>
<dc:creator>MichaelH</dc:creator>
<guid isPermaLink="false">964653@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Try this.  Example is a &#60;a href=&#34;http://codex.wordpress.org/The_Loop&#34;&#62;loop&#60;/a&#62; so you may have to wedge this into your existing code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
$year=&#38;#39;&#38;#39;;
while (have_posts()) : the_post();
if (mysql2date(&#38;quot;Y&#38;quot;, $post-&#38;gt;post_date) != $year) {
$year = mysql2date(&#38;quot;Y&#38;quot;, $post-&#38;gt;post_date);
$count=1;
}
the_title();
if ($count == 1) {
the_time(&#38;#39;F Y&#38;#39;);
} else {
the_time(&#38;#39;F&#38;#39;);
}
$count++;
endwhile;
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Related:&#60;br /&#62;
&#60;a href=&#34;http://codex.wordpress.org/Template_Tags/the_time&#34;&#62;the_time()&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>gmisen on "show post dates, but list year only once?"</title>
<link>http://wordpress.org/support/topic/236860#post-964330</link>
<pubDate>Fri, 23 Jan 2009 16:18:04 +0000</pubDate>
<dc:creator>gmisen</dc:creator>
<guid isPermaLink="false">964330@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi, this has been driving me crazy, maybe someone here has done this before?&#60;/p&#62;
&#60;p&#62;I want to list my posts and show the date. But I only want the year to show in the top post of that year. The latest post in 2008 would read December 2008, but the following ones would read only July, March, January --- No year.  Then December 2007, followed by only July, March, etc etc.&#60;/p&#62;
&#60;p&#62;I've tried a bunch of ways to accomplish this, but nothing seems to work. Any suggestions?&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
