TXP Tip: Override the Displayed Date Format

This is merely an “undocumented” attribute to the <txp:posted /> tag – so no hacks today! I say undocumented – it may be written down somewhere, but I couldn’t find it!

Anyway, the output of <txp:posted /> is usually set in your admin->preferences page. Such as “14th Jan 2005” or something similar. However, if need be, you can override this format. Simply provide a format attribute to the tag – i.e. something like <txp:posted format="m.d.y" /> would return 01.14.05. The format can be any valid PHP date format that you want.

Anyone else got any good Textpattern related tips like this?