About   |   Projects   |   Elsewhere   |   Work   |   Feeds   |   Contact

Archive for 11 August 2004

Altering the number of posts shown on a Wordpress index

This is a quick hack to change the number of posts that are shown on an index page (note that this is distinct from the number of posts that are displayed on the index page, which is controlled from the Wordpress options)

In the index template, find the line

foreach ($posts as $post) : start_wp(); ?>

and replace it with

for ($i=0; $i<3; $i++)
{
$post = $posts[$i];

start_wp();

Then at the end of the posts section, find the line

endforeach; else:

and replace it with

}; else:

The value of $i in the for.. next loop controls the number of posts displayed.

11 August 2004

Technical

No comments yet

Inappropriate Brand Associations Of The Day, Number One

tesco

11 August 2004

Change

No comments yet

Uninsured drivers

The BBC is running a story about the latest ‘crackdown’, this time on uninsured drivers. Apparently the solution is to link up the DVLA databases with those of the insurers (so stand by in two years for the ‘it’s behind schedule and over-budget stories’), and numberplate recognition technology.

What I could never understand about insurance is why there wasn’t a system similar or identical to the car tax system. When you buy your insurance, you get a disc to display in the windscreen with a prominent expiry date, and failure to display the disc is a cue for the authorities to take action. This would have cost a miniscule fraction of the technology route, and could have been doing something about the problem for years already.

You could be cynical and suggest that headlines about confiscated and crushing cars make better headlines, but…

11 August 2004

Change

No comments yet