How to Add Keywords and Meta Descriptions in WordPress
Do you want to improve your SEO by adding keywords and meta descriptions? These helpful lines of code tell a search engine what your website or a certain page is about.
Keywords are words and phrases, relevant to your blog content, that cause your site to appear when people search for those terms. Using relevant keywords can drastically improve your search rankings. A meta description is a short blurb about a website or page. It allows you to have a clean, concise description that appears in the search results. Without one, Google will just pull text from the website.
While these attributes may seem small, they can make a sizable difference in your SEO rankings. Luckily, it’s fairly easy to edit them in WordPress. This guide will walk you through the two methods available for adding keywords and descriptions: downloading a plugin or adding them yourself.
Method One: Yoast SEO
By far the easiest way to add keywords and meta descriptions in WordPress is with the Yoast SEO plugin. This tool is designed to help propel you to the top of the search rankings, and it’s very easy to edit elements such as title and meta descriptions with it.
As of Yoast version 6.3, you can no longer add meta keywords to your posts and pages. However, you still can add a focus keyword, which is a word or phrase that best defines your article. Placing this keyword naturally on your page will make it will rank higher. Yoast helps you include these focus keywords in your article.
To add meta attributes to your website with a plugin, you’ll need to follow these steps.
1. Install and activate the Yoast SEO plugin
2. Add a focus keyword
3. Add a meta description
Step 1. Install and activate the Yoast SEO plugin
To install Yoast SEO, you can get it from your admin dashboard, the WordPress Repository, or Yoast’s website. If for any reason you need to install Yoast manually, try this guide to updating plugins via FTP.
To install Yoast automatically, go to your dashboard, Plugins » Add New, and search for “Yoast SEO”. You can activate it from the plugins page.
Once installed and activated, you can start Yoast’s SEO configuration wizard. It should walk you through everything you need to do to get the plugin up and running on your site.
Once you’re finished setting up Yoast, we can tackle those meta elements!
Step 2. Add a focus keyword
Whatever post, category, or page you wish to edit, head to your WP-Admin and find it on the left-hand side. If you want to edit the keyword or meta description of a post, for example, click Posts » All Posts and select one!
Now that you have Yoast SEO installed, you should see a box at the bottom of the page, below your post content. You can set your focus keyword on the “Keyword” tab. Once you do, Yoast will make some edit suggestions, such as including that keyword in your H2 subheadings. Follow them, and your search rankings will soon improve!
Yoast no longer supports meta keywords, as many search engines ignore them or don’t prioritize them due to abuse, so you’ll need to add them manually if you want to. Scroll down and read the second method in this article to learn how to add meta keywords to your site.
Step 3. Add a meta description
On the same “Keyword” tab, you should see a snippet preview of how your article will appear on Google. Here, you can edit the title and meta description of your page. Use it to write a concise and readable paragraph that includes helpful, relevant keywords.
Think of it like a pitch. Your job is to convince whoever sees your result on Google to click and check it out!
And that’s how you add focus keywords and meta descriptions using Yoast SEO. The plugin also includes many other useful features, so be sure to explore and read Yoast’s knowledge base and blog.
Method Two: Manually
Maybe you’re a firm believer in meta keywords, or you just prefer to do things yourself. Either way, it’s possible to add important meta attributes to WordPress without using plugins. To do so, just follow these few steps.
1. Edit your header.php file
2. Add a conditional tag query for individual posts and pages
Remember to backup WordPress before making any changes to its core files. Also, consider using a child theme.
Step 1. Edit your header.php file
WordPress allows you to create generic meta tags that affect the description, title, and keywords of your website. These are placed in your header.php file and affect every page.
You do not have to edit any code to change your website title or description. Just go to Administration » Settings » General and change them there.
However, if you want to add these attributes to the header, you can either access WordPress and header.php via FTP, or go to Appearances » Editor » header.php to edit it from the dashboard.
In the header file, you will most likely find your title tag. It will look similar to this:
<title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title>
This is calling from the title you set in your administration settings, so it’s best not to edit it. You can change this to a simple <title>Your site name</title> function, but this may change the title for every page on your site.
Below this line, you can now add your meta tags for keywords and site description. Remember, this is a generic description that applies to your whole website. For your search engine snippet, add this:
<meta name=”description” content=”your description here” />
For keywords, add this:
<meta name=”keywords” content=”your keywords here” />
Now replace the content tag in quotes with the description and keywords you want to set. Try to keep the snippet around 130-150 characters, as this is around the range currently allowed by Google. Also, avoid keyword stuffing and use only phrases relevant to the content.
Step 2. Add a conditional tag query for individual posts and pages
What if you want to change description and keywords for specific pages? For this, it’s best to simply use a plugin, but you may be able to do so with a conditional tag query.
<meta name=”description” content=”<?php if ( is_single() ) {
single_post_title(”, true);
} else {
bloginfo(‘name’); echo ” – “; bloginfo(‘description’);
}
?>” />
This code causes a description you set for that page to appear if WordPress is on a single post view, or roll back to displaying the default otherwise.
Adding Meta Elements to WordPress
Now that you’ve added these important features to your site, your SEO should be looking much better. Titles, keywords, and meta descriptions are all very important, both for your Google search rankings, and to make your site look much cleaner on the search results!
If this guide helped you out, please check out our Twitter and Facebook pages to see our other WordPress tutorials! You can also take a look at our SEO-related articles, and learn how to optimize your WordPress website for SEO, or if sliders are really bad for your search rankings.
Akib
Thank you Barron. Your article helps me a lot for my website
Ali
thanks Barron
Ready to start creating slides the easy way?
Get Soliloquy Now