July 22, 2010 : 300 views : View Comments
SEO-Friendly META Description Tag for WordPress
In this article, I will explain how to make your WordPress META Description more SEO-friendly using WordPress Conditional Tags. If you followed my last post, I spoke about Optimizing Your WordPress Title Tags to make them more search-friendly. Basically, you should be able to use both for a fairly effective optimization of your WordPress blog (without having to use any plugins).
WordPress & META Tags
As you all know, WordPress does not include META Tags by default. It is up to each user to add their own META Tags. If used correctly, a META Description tag can be a very valuable SEO tool. However, in WordPress, if you do decide you need a META Description tag, it will usually have to be placed in the ‘header.php’ file within the<head></head> tags.
The thing about WordPress and the ‘header.php’ file is that the same header file and same META info shows up on every single page (because it’s a PHP include). For design, this is very easy and makes a ton of sense. For search engine optimization, it isn’t a very good solution.
Why Isn’t a Single META Description Good Enough?
Why isn’t it a good solution, you ask? For SEO, it is optimal to have a unique Title Tag & META Description for every single page of your site/blog. If you just plug in your META Description as is, it will be duplicated across ever page of your site. This means that the same META Description will be indexed for every page of your site, regardless of whether or not it has to do with each page’s content or not.
META Descriptions are probably the most important META Tag you can utilize for SEO. They are generally pulled by search engines and displayed directly underneath your listing in the SERPs, making them a super premium place to have good keywords.
In order to ensure that each page of your site gets the attention that it should, you’re gonna to use a different META Description for each page of your site (rather than 1 general one across the whole site).
How Can I Optimize My META Description?
I’m glad you asked! Finally, we’ll get to those Conditional WordPress Tags I talked about earlier. Here is the code below:
$out_excerpt = str_replace(array(“\r\n”, “\r”, “\n”), “”, get_the_excerpt());
echo apply_filters(‘the_excerpt_rss’, $out_excerpt);
endwhile;
elseif(is_category() OR is_tag()):
if(is_category()):
echo “Posts related to Category:
“.ucfirst(single_cat_title(“”, FALSE));
elseif(is_tag()):
echo “Posts related to Tag:
“.ucfirst(single_tag_title(“”, FALSE));
endif;
else: ?><?php bloginfo(‘description’) ?>
<?php endif; ?>” />
Install this code in between your WordPress site’s <head></head> section in the ‘header.php’ file. Basically, this code will do a couple things.
- If the search engine/user views your site’s individual pages or categories, the conditional WordPress tags kick in and tell the browser/webcrawler to grab the opening excerpt of your post/page and use that as the META Description tag.
- If the search engine/user lands on the homepage, it will tell the browser/webcrawler to display the default Blog Description (which you specify on the ‘Settings’ page) as your META Description.
Anything Else?
Yes there is. Using this code is a great way to get the focus on your site’s content rather than always defaulting to one single description. However, there are a couple of things you must remember to do:
- Make sure that valuable keywords are included early on each page, preferably within the 1st two sentences. This will help ensure that those valuable keywords get picked up in search engines, and hopefully pulled for whatever keyphrase you’re targeting.
- Make sure that the content in your post /page works in conjuction with your post/page title and doesn’t contradict it. This will help solidify your post/page’s reputation with the search engines.
Hope this tutorial helps!
Photo Credit: Snacktime2007 on Flickr
Like This Post? Why Not Share it.
Related Posts
If you like this post, then you might like these as well!
-
Lou Sparx
-
jacobstoops
-
Web Marketing
-
jacobstoops
-
jawir


Have a seminar or event coming up? Looking for people to present on SEO, or a variety of other topics surronding the search industry? I'm interested in booking
Subscribe via RSS
Subscribe via Email
Save on Delicious
Connect on SpeakerSite
Jacob Stoops on Twitter
Agent SEO on Facebook
Jacob Stoops on LinkedIn
Would you like to write a 