How to change 'Sorry, no posts matched your criteria.'
What do you do with your readers when your blog doesn't supply what they're looking for? If you're most WordPress themes, you give them the rather ugly message, 'Sorry, no posts matched your criteria.' If you want to change this to something more friendly or useful, here's how to do it. Firstly, find the file you want to edit. For most people, this will be the one that generates search... Read more
How to include the author's photo in a WordPress post
If you have a multi-author blog, you may want to include a little author photograph with each post. The easiest way to do this is to use the Gravatar service: this is owned by Automattic, the people who brought us WordPress and Akismet. And you only need one line of code to add the picture: <?php echo get_avatar( get_the_author_id(), $size = '40', $default = 'PATH TO URL' );... Read more
Twednesday : Free Twitter buttons and logos
The lovely Jane, aka eAuctionAnorak, aka my first blog sprog, aka Demon Bead Lady pointed out to me that TwitterButtons' images seem to have vanished. Shame, because they had some good ones, and auto-generating the "follow-me" code was useful. If you're now looking for a new way to link your Twitter account from your blog or website, here are some sources of lovely icons we've noticed:... Read more
How to back-up your WordPress blog
photo credit: Quinn DombrowskiHaving written yesterday about backing up WordPress before an upgrade, I thought today we'd have a look at what backing up WordPress actually means. It's not necessary to back up every single file of your entire install: you need to preserve the files that are unique to you. If (dog forbid) your server fell over and died, or your hosting company ceased business, or... Read more
Adding links to WordPress navigation lists
WordPress likes making lists for navigation. So you might have a list of pages like this: <ul><? wp_list_pages("title_li="); ?> </ul> or a list of categories like this: <ul><? wp_list_categories("title_li="); ?> </ul> which, if you like, you can then style with CSS to make a horizontal navigation bar. Because WordPress doesn't automatically add the... Read more
Upgrading WordPress (just do it, will you!)
The release of WordPress 2.8 is "tentatively" scheduled for 10th June. It looks like the release may even happen on time, so make sure you're ready to upgrade. How to upgrade if you're running WP 2.7 or 2.7.1 If you are a good person
running the latest version of WordPress, then upgrading will be easy for you. A button will appear on your desktop asking if you wish to upgrade: click... Read more
Showing or hiding posts based on tags
photo credit: gilleskleinWriting Taexalia's new theme this week, I needed a way to exclude posts from her home page based on tags. We didn't want Twitter archive posts to show up in the "featured" postition. Often in this kind of situation, the posts you want to exclude will be from a specific category, but this time, they weren't: they were in a category with other posts that she *would* want... Read more
Find the first image in a WordPress post
There are some snippets of code that stand you in very good stead, and this one, to find and display the first image in a post, is one such. I wrote it for Dan's blog nearly a year ago, and have used it so many times since, most recently just yesterday for Taexalia's new blog theme. If you have a magazine-style theme, wanting to find the first image in a post and display it on your home page... Read more
How to automatically publish your RSS feed on Twitter
Another quickie via Google searchers: how do you automatically publish your RSS feed to Twitter? Firstly, be sure that you want to. I've seen eBay sellers and other ecommerce merchants publishing their product listings to Twitter. If that's a couple of dozen items at a time, at one tweet each, it's a surefire way to lose a lot of followers. Think about what you'd like to read. Automation... Read more
Converting WordPress categories into tags
We looked before at the difference between WordPress categories and tags, but what do you do if you have a million different categories that really should be tags? Fortunately, WP has a built-in tool which allows you to easily convert categories into tags: find it in Admin > Posts > Categories, linked down at the bottom on the right. It's slightly mis-named, as it doesn't actually... Read more









