Make Wordpress SEO friendlier

Just a quick question…

If meta keywords were built for SEO friendly, why the default Wordpress theme comes with no meta description and meta keyword?
Wordpress default theme
Well, probably a lot of user added meta description and meta keywords themselves, but that’s all. It all fixed and not change-able. I recently look into the WP template tags, which has this get_the_tags function.

So I got into the default theme, add in this:

<meta name=”keywords” content=”
Check if it is on single.php
<?php if (is_single()){ ?>
If it’s on single.php, show the tags of the entry
<?php $posttags = get_the_tags();if ($posttags) {foreach($posttags as $tag) {echo $tag->name . ‘, ‘; }}?>
If not on single.php it shows these keywords.
<?php } else { ?>
My, own, fixed, keywords
<?php } ?>”
/>

Now you have different meta keywords on different entry, and the keyword is according to your post tags :)

Digg it StumbleUpon del.icio.us

Related entries

2 comments

  1. Dennis Lee says:

    Cool tip… but too bad I didn’t use tags in the first place…

    Btw, I can’t see any label on your comment form. I’m just guessing which textbox to enter what.

Leave a reply