Easy Meta Description

Free Meta Advert screenshot
Spread the love

The meta description is your free advert for your website content.

Despite it’s importance, WordPress does not use the meta description in it’s standard configuration. Yes, there are many plugins to add it to your WordPress site. The process is so easy to do without plugins, I prefer my easy way.

I always include this when I’m configuring WordPress installations. Before I show you the code, let me explain:

  1. What is a Meta Description?
  2. Why are Meta Descriptions important?
  3. Installing Shrewdies Easy Meta Description code

What is a Meta Description?

Meta elements are part of the HTML language that is used to write web pages. When you write in WordPress using the Visual editor, you never see HTML. If you switch to Text editor, HTML reveals itself as a series of markup elements such as <P> for Paragraph; <LI> for LIst, etc.

All the content that you see when you are editing, is preceded by a <HEAD> section that computers use to describe important information about the page. Many elements are the same for all pages on your website. <META Description> is used to summarize the page content.

Your visitors rarely see the meta description. In some browsers, it is quite easy to check if it is there. For example, in Firefox, if you right-click on the page, you should see a Page Info option that will reveal the description, if there is one.

So, if it’s so hard to find, why are meta descriptions important?

Why are Meta Descriptions important?

Free Meta Advert screenshot
Earlier, I explained the importance of the excerpt, which is a short summary of your article. In some situations, you might want to keep your excerpt as an “Internal Summary” and maintain a separate meta description as an “External Summary.”

For most situations, it is easiest to think of one summary that is used for internal, and external purposes. The summary is important because it sells your page.

When a visitor browses an archive, they will see a list of articles. I prefer themes that display the excerpt, and each excerpt should allow your visitor to quickly grasp the purpose of each article. It should draw them into reading the full article. This is important for keeping visitors on your website.

More importantly, we can combine the excerpt with the meta description. Google, and some other search engines, will often be guided to display your meta description in the search results. This is important for drawing visitors into your website.

So, by combining the excerpt and meta description, we create a free advert to draw people into our website. We repeat that to advertise related content within our website. This provides a consistent feel to navigation that should increase click through rates. Better traffic and reduced bounce rate are both measurable benefits from our free meta advert.

Use meta description to gain early traffic through your WordPress Installation phase. Use it to improve click-thru rates through the life of your website.

Installing Shrewdies Easy Meta Description code

This code is best used in conjunction with Shrewdies excerpt character counter. I recommend installing it via the Functionality plugin, as a better alternative to your theme’s functions.php.

Note that I have included Meta Keywords in addition to Meta Description. Though Google no longer considers keywords, other search engines do. I also find that keywords help you to keep your content on-topic.

add_action('wp_head', 'shrewdies_meta_elements');
function shrewdies_meta_elements() {
	global $post;
	$metakeys = implode(',',wp_get_post_terms($post->ID, array('category','post_tag'), array("fields" => "names")));
	$text = strip_tags($post->post_excerpt);
	if ( is_single() || is_page() ) {
		echo '<meta name="description" content="'.$text.'" />'."n";
		echo '<meta name="keywords" content="'.$metakeys.'" />'."n";
	}
}

Note that I add the meta elements to single posts, and to pages. You might be wondering why I include excerpt, categories, and tags, when these are not available on the Page Admin form. See Keep WordPress Pages Organized for the answer.

If you have questions or opinions about this free meta advert, please: