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 :)

2 thoughts on “Make WordPress SEO friendlier

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>