Popular Posts Update

The popular posts plugin was broken, but it’s fixed now. Update your template so it looks like this if you want to use it:

{if $pposts != ''}
<br />Most Popular Posts<br /><br />
{foreach from=$pposts key=key item=details}
<nobr><a href="{$details.url}" title='{$details.title}'>{$details.title|truncate:30:"..."}</a>: {$key}</nobr><br />

By Donncha

Donncha Ó Caoimh is a software developer at Automattic and WordPress plugin developer. He posts photos at In Photos and can also be found on Twitter.

2 replies on “Popular Posts Update”

Just tried it and when I try to access my blog I get:

Fatal error: Smarty: [in index.html line 65]: syntax error: unidentified token ‘‘’’ (Smarty_Compiler.class.php, line 1228) in /home/ilug/ on line 1824

Looks like WordPress replaces “normal quotes” like ” and ‘ with “curly quotes”. When you copy and paste the above code into your template, Smarty won’t understand them.
Replace the quotes with shift-2 and the character between ; and # (on a UK/Ireland keyboard anyway!)
Not sure if the above quotes are going to be replaced either which is why I’m spelling out the characters!

Leave a Reply