Posts by: Lisa

Using Google Code libraries with WordPress

By default, WordPress loads the version of jQuery that comes with the package. But there is an alternative way of doing it and that’s to use the AJAX Libraries API at Google Code – use their bandwidth, why not…
A few lines added to your functions.php in the theme you’re building and you’re ready to go.

WordPress SEO – the Post Title

The one thing you have instant control over is the post title – and, usefully, this can make a huge difference, far out of proportion to any time and effort spent in other SEO directions.

Fatal Error – Cannot modify header information

You’ve been hacking around in WordPress and you get…
Fatal Error – Cannot modify header information – headers already sent …
Why? Very simply, because the script has output something (… ie. printed it to your browser) before trying to execute a  PHP header(“…”) statement – which just isn’t allowed with PHP. Often, it’s a header(“Location: …”) [...]

WordPress – Display Random Posts

So you want to display a random list of posts, maybe in a sidebar widget… One way to do it is to use the query_posts() function, but this isn’t always the best…

WordPress Theme Frameworks

Since the arrival of WordPress 2.7, the true framework is based on the concept of parent/child WordPress themes. A child theme is dependent on its parent – here, the framework – for its template files and functions, it’s not going work without it.

JQuery, Cufon and WordPress

Just at the moment the best font replacement technique around is cufón – so how to get this technique into your WordPress theme design?

Multiple WordPress Queries – Duplicates

You’ve got 2,3,4… custom post queries on a page and you need to get some control over duplicates – it looks unprofessional if your theme keeps showing the same stuff. Let’s take the example of displaying separately posts from 2 different categories – but if a post is in both categories, not duplicated across the [...]

WordPress, Twitter and URL-shortening

You’re producing a WordPress theme, or plugin, that is related to Twitter and for obvious reasons you want to include url-shortening functionality… How’s it, generally, done?
Just the briefest snippet of PHP, this example for is.gd:-

function shorten_url($url) {
$request = 'http://is.gd/api.php?longurl=' . $url;
return @file_get_contents($request);
}

WordPress Custom Category Archives

Note, we’re talking here about different category archive pages – not having a post page customised according to the category that post is in….
There’s 2 ways of doing this – first, the simple way, for more minor changes to the overall theme template, you can use the is_category function:

WordPress Twitter Integration

Publicity, relationship-building, just plain keeping in touch – Twitter offers it all and the art is to integrate your tweeting into your blogging, if that doesn’t sound too salacious. Here’s a few scattered suggestions on the subject.
First up, to begin at the beginning, reply to @’s – I know it’s absolutely bleedin’ obvious, but if [...]