<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Wordpress: How to Customize the Date Format for wp_get_archives</title>
	<atom:link href="http://www.keetee.com/how-to-customize-the-date-format-for-wp_get_archives/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.keetee.com/how-to-customize-the-date-format-for-wp_get_archives/</link>
	<description>My brain to your browser.</description>
	<lastBuildDate>Thu, 11 Mar 2010 21:09:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Giraldi Maggio</title>
		<link>http://www.keetee.com/how-to-customize-the-date-format-for-wp_get_archives/comment-page-1/#comment-3350</link>
		<dc:creator>Giraldi Maggio</dc:creator>
		<pubDate>Mon, 22 Feb 2010 03:07:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.keetee.com/?p=1032#comment-3350</guid>
		<description>Great! Thanks for the tips. This led me to experimenting with solution that does not touch the core of WP. I managed to come up with two solutions. The first one is a COPY-AND-PASTE method. The second is the FILTER method.

1. COPY-AND-PASTE Method

Basically, I just copied the function for the archive list from general-template.php and pasted it in my theme&#039;s function.php.

Then change the function name from wp_get_archives to my_wp_get_archives, for example. So you call the archive list using the latter one.

To make it more efficient, I deleted the lines that I don&#039;t need.

This way I can modify the code as I like, using your tips.

Here&#039;s a link to my modified function:

http://www.zumodrive.com/share/3Mr0NGQzMT

Change line 53 to customise the date (using your tips).
Change lines 71 to 78 to customise the format (according to your needs).

2. FILTER Method

For the second method, I tried using the WP filter feature. This one retains the function name (wp_get_archives). Also, put this in your function.php.

I have 2 examples. One allows changing the dates only. The other allows changing the whole format. Both examples displays the dates in numerical format with a slash as delimiter.

a. Custom dates:

http://www.zumodrive.com/share/3Mp1N2Q4Y2

b. Custom format

http://www.zumodrive.com/share/3MrXNzk3YT

Of course, you can be creative with the code.

These are only examples of what you can do. They may not be the best, but they work ;)... and you don&#039;t have to change any core coding, too!!

Cheers.</description>
		<content:encoded><![CDATA[<p>Great! Thanks for the tips. This led me to experimenting with solution that does not touch the core of WP. I managed to come up with two solutions. The first one is a COPY-AND-PASTE method. The second is the FILTER method.</p>
<p>1. COPY-AND-PASTE Method</p>
<p>Basically, I just copied the function for the archive list from general-template.php and pasted it in my theme&#8217;s function.php.</p>
<p>Then change the function name from wp_get_archives to my_wp_get_archives, for example. So you call the archive list using the latter one.</p>
<p>To make it more efficient, I deleted the lines that I don&#8217;t need.</p>
<p>This way I can modify the code as I like, using your tips.</p>
<p>Here&#8217;s a link to my modified function:</p>
<p><a href="http://www.zumodrive.com/share/3Mr0NGQzMT" rel="nofollow">http://www.zumodrive.com/share/3Mr0NGQzMT</a></p>
<p>Change line 53 to customise the date (using your tips).<br />
Change lines 71 to 78 to customise the format (according to your needs).</p>
<p>2. FILTER Method</p>
<p>For the second method, I tried using the WP filter feature. This one retains the function name (wp_get_archives). Also, put this in your function.php.</p>
<p>I have 2 examples. One allows changing the dates only. The other allows changing the whole format. Both examples displays the dates in numerical format with a slash as delimiter.</p>
<p>a. Custom dates:</p>
<p><a href="http://www.zumodrive.com/share/3Mp1N2Q4Y2" rel="nofollow">http://www.zumodrive.com/share/3Mp1N2Q4Y2</a></p>
<p>b. Custom format</p>
<p><a href="http://www.zumodrive.com/share/3MrXNzk3YT" rel="nofollow">http://www.zumodrive.com/share/3MrXNzk3YT</a></p>
<p>Of course, you can be creative with the code.</p>
<p>These are only examples of what you can do. They may not be the best, but they work ;)&#8230; and you don&#8217;t have to change any core coding, too!!</p>
<p>Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.keetee.com/how-to-customize-the-date-format-for-wp_get_archives/comment-page-1/#comment-3056</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Fri, 22 Jan 2010 07:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.keetee.com/?p=1032#comment-3056</guid>
		<description>That was some interesting stuff there. Thanks for posting it.</description>
		<content:encoded><![CDATA[<div style="color: #510000;">
<p>That was some interesting stuff there. Thanks for posting it.</p>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allison</title>
		<link>http://www.keetee.com/how-to-customize-the-date-format-for-wp_get_archives/comment-page-1/#comment-1486</link>
		<dc:creator>Allison</dc:creator>
		<pubDate>Fri, 28 Aug 2009 22:46:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.keetee.com/?p=1032#comment-1486</guid>
		<description>That would be great! I&#039;d love to see a plugin or other template-oriented solution out there. The couple I&#039;ve seen have been pretty messy and impossible to customize for the casual user. Let me know if you come up with anything—I&#039;ll link it here!</description>
		<content:encoded><![CDATA[<p>That would be great! I&#8217;d love to see a plugin or other template-oriented solution out there. The couple I&#8217;ve seen have been pretty messy and impossible to customize for the casual user. Let me know if you come up with anything—I&#8217;ll link it here!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.keetee.com/how-to-customize-the-date-format-for-wp_get_archives/comment-page-1/#comment-1481</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Thu, 27 Aug 2009 02:49:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.keetee.com/?p=1032#comment-1481</guid>
		<description>Thanks for this Allison, it was exactly what I needed.

I have to believe that this sort of functionality can be added using a plugin so that it&#039;s independent from the WordPress core. I may poke around and see if I can come up with something.</description>
		<content:encoded><![CDATA[<p>Thanks for this Allison, it was exactly what I needed.</p>
<p>I have to believe that this sort of functionality can be added using a plugin so that it&#8217;s independent from the WordPress core. I may poke around and see if I can come up with something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allison</title>
		<link>http://www.keetee.com/how-to-customize-the-date-format-for-wp_get_archives/comment-page-1/#comment-1476</link>
		<dc:creator>Allison</dc:creator>
		<pubDate>Wed, 26 Aug 2009 03:14:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.keetee.com/?p=1032#comment-1476</guid>
		<description>Thanks for reminding us, Arif. I&#039;m not sure about &quot;many reasons,&quot; but here&#039;s where you have to be cautious:

A) You don&#039;t want to screw up anything on the back-end so follow the directions precisely. Luckily, if you do make some kind of egregious error that you can&#039;t fix, you can always just download the WP install again and overwrite your modified general-template.php.

B) As forementioned, new Wordpress installations will override the fix.

It&#039;s not an ideal solution, but unfortunately Wordpress doesn&#039;t facilitate one—and a janky solution is preferable to none!</description>
		<content:encoded><![CDATA[<p>Thanks for reminding us, Arif. I&#8217;m not sure about &#8220;many reasons,&#8221; but here&#8217;s where you have to be cautious:</p>
<p>A) You don&#8217;t want to screw up anything on the back-end so follow the directions precisely. Luckily, if you do make some kind of egregious error that you can&#8217;t fix, you can always just download the WP install again and overwrite your modified general-template.php.</p>
<p>B) As forementioned, new Wordpress installations will override the fix.</p>
<p>It&#8217;s not an ideal solution, but unfortunately Wordpress doesn&#8217;t facilitate one—and a janky solution is preferable to none!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arif</title>
		<link>http://www.keetee.com/how-to-customize-the-date-format-for-wp_get_archives/comment-page-1/#comment-1468</link>
		<dc:creator>Arif</dc:creator>
		<pubDate>Mon, 24 Aug 2009 10:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.keetee.com/?p=1032#comment-1468</guid>
		<description>your solution leads to change the core of WP... for many reason this isn&#039;t a great idea...</description>
		<content:encoded><![CDATA[<p>your solution leads to change the core of WP&#8230; for many reason this isn&#8217;t a great idea&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anastasia</title>
		<link>http://www.keetee.com/how-to-customize-the-date-format-for-wp_get_archives/comment-page-1/#comment-1430</link>
		<dc:creator>Anastasia</dc:creator>
		<pubDate>Mon, 17 Aug 2009 23:29:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.keetee.com/?p=1032#comment-1430</guid>
		<description>Thank you for this! I am trying to start my own Wordpress blog and these tips really come in handy.</description>
		<content:encoded><![CDATA[<p>Thank you for this! I am trying to start my own Wordpress blog and these tips really come in handy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
