malcolm coles

Where to find me

Unique meta description and meta keywords in your Wordpress themes

Posted in Wordpress by Malcolm Coles on the May 26th, 2008

Update

Here is the description with both category and tag pages included:

<meta name=”description” content=”<?php if(is_home()) {echo (’’PUT YOUR HOME PAGE DESCRIPTION HERE’);} else { if(is_category()) {echo category_description();} else { if(is_tag()) {echo single_tag_title(); } else {echo get_post_meta($post->ID, “Metadescription”, true); } } } ?> “>

Original post

I know little about PHP. But after fiddling round with other people’s example code, I’ve finally managed to use custom fields to get a unique meta description and unique meta keywords on each post, and on the home page.

To get this to work, you need to add new custom fields called Metadescription and Metakeywords to each post. The ones for the home page you hard code. And I’m still working on the category pages …

Copy and paste the code below into the head section of the header bit of your wordpress template. It basically checks if it’s the home page. If it is, it uses the hard-coded meta description and meta keywords. If it’s not, it goes and looks up the custom fields and uses the values from there. So there we have it: a unique meta description and unique meta keywords in wordpress.

Unique meta descriptions in wordpress

<meta name=”description” content=”<?php if(is_home()) {echo (’PUT YOUR HOME PAGE DESCRIPTION HERE’);} else {echo get_post_meta($post->ID, “Metadescription”, true);}?>”>

Unique meta keywords in wordpress

<meta name=”keywords” content=”<?php if(is_home()) {echo (’PUT YOUR HOME PAGE KEYWORDS HERE’);} else {echo get_post_meta($post->ID, “Metakeywords”, true);}?>”>

Event tyres review: buying tyres online

Posted in Good reviews by Malcolm Coles on the May 21st, 2008

Four recent car journeys cost me a lot of money … A puncture, a parking ticket (for meter stuffing, even though I only parked there for 45 minutes. Grrr), a speeding ticket and another puncture.

Kwikfit first: bad review

The first puncture was repaired by Kwikfit. I drove down there at 12, which turned out not to be an appointment as I thought, just an indicative time. I would have to wait.

They quoted almost £200, but when I pointed out the price was cheaper on their website, they said I could have that price (about £30 off) if I bought a print out along.

Somehow, I didn’t feel pleased about the discount, just relieved I hadn’t been ripped off.

Event mobile tyres: good review

Event tyres van from their website So when I somehow got another puncture, I bought a tyre online instead from Event tyres - which was delivered and fitted at my house.

A van turned up at the exact time Event tyres said it would, the cost was £50 less than at Kwikfit for an identical tyre, and it was all over and done with in minutes. Excellent.

Have you used them? What do you think?

Nofollow and internal redirects: sites that accept links - but don’t link out fairly

Posted in Internet by Malcolm Coles on the May 19th, 2008

There seem to be increasing numbers of sites who suck up weblinks, but don’t link back out in a ‘proper’ way - ie in a way that helps the site linked to do better in google.

Instead, they use funny internal redirects, stick ‘no follow’ on external links, or just don’t bother making them hyperlinks.

Offenders

I’ve started a list of offenders. Add any others you know of - don’t worry, Wordpress will add nofollow to them all …

  • Wikipedia - all links, even the attributed sources of its facts, are given the nofollow tag.
  • BBC - redirects via some funny internal redirect.
  • Myspace - redirects all new links added vis MSPlinks.
  • UK newspaper sites - even when they include web addresses in their stories, they don’t bother to make them hyperlinks.
  • Youtube - the link in your profile is ‘nofollow’ed.
  • Newsvine - Someone writes an interesting news story, people vote it to the top of the list … but rel=nofollow means no link benefit to the site that wrote it. But newsvine gets all the keywords from its summary …
  • Spock.com - So, I’ll spend time telling you which sites are relevant to me for your person search engine. Then you’ll create a profile page for me, to help you do better for my name as a search term. Then you’ll nofollow all the links to sites about me. Nope.