Quantcast
Channel: Stephanie Leary
Viewing all articles
Browse latest Browse all 5

Using categories and tags as meta keywords

$
0
0

Your categories and keywords are valuable bits of metadata, but WordPress doesn’t use them in its meta tags. Even the popular All in One SEO Pack plugin uses only categories, not tags.

To use both, add this to the head section of your theme:

  foreach((get_the_tags()) as $tag) {
    $keywords[] = strtolower($tag->name);
  }
  foreach((get_the_category()) as $category) {
    $keywords[] = strtolower($category->cat_name);
  }
?>
" />

The last line removes duplicates and joins the keywords with a comma — just the way search engines like them.


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images