add meta tags in wordpress

How to Add Meta Tags in WordPress

Do you want to include meta tags on your website? We’ve got you. In this guide, we’ll show you different ways to add meta tags in WordPress with and without plugins. O

Optimizing your blog posts with the right meta tags will give you better results on search engines. In this article, you’ll learn how to do it correctly. But before that, let’s better understand what meta tags are.

What Are Meta Tags?

Meta tags are HTML snippets used in the header section of a website. They aren’t visible to the visitors in the front end and are used by search engines to better understand the content of the page. Meta tags help you rank your pages higher, so adding them is a must.

Apart from helping search engines, meta tags such as titles and descriptions are also helpful for users. By having a unique title and description in the search engine result pages (SERPs), you can get more organic traffic and outrank your competitors.

Types of Meta Tags

There are three types of meta tags:

  • Title tag
  • Description tag
  • Keyword tag

Let’s take a quick look at each of them.

Title tag: This is the main meta tag for displaying titles on the SERPs. The heading is configured with the title meta tag. Changing the title tag will result in changing the SEO title too.

title tags for seo

Description tag: The text you see below each individual search result is configured with the description tag. It’s what describes in 1 or 2 lines what the post is about. Most people check the description of the search results before deciding whether to click on a result or not. That’s why it’s essential that you have a compelling meta description.

meta description tag

Keyword tag: Keywords are also essential tags you need to use. It tells the search engine the word you’re targeting to rank.

Why Add Meta Tags in WordPress?

When you run an online business, one of your main goals is to generate more traffic to your site, which will eventually lead to more leads and revenue. WordPress comes with limited SEO functionalities, so to enhance the reach of your site in the search engine result pages, you should add meta tags.

As we mentioned earlier, meta tags help search engines and users better understand your content. It is suitable for social media sharing. Adding Open Graph meta tags lets you choose a custom thumbnail and description for your blog posts when shared on social media. 

How to Add Meta Tags in WordPress

You can add meta tags in WordPress in two ways:

  1. Using a dedicated plugin
  2. Manually

We will explain both methods, so you can choose the most appropriate for you.

1) Add Meta Tags with a Plugin

The easiest way to add meta tags in WordPress is to use a plugin. For this, you can use any SEO plugin like Rank Math, Yoast, All In One SEO Pack, or any other that you like. For this tutorial, we are going to use Rank Math.

The first thing you need to do is install and activate Rank Math on your website. The plugin has a step-by-step customization wizard where you can configure it according to your requirements. Once you have completed the setup, you are good to move forward.

1.1) Posts/Pages

This section will show you how to add meta tags like keywords, titles, and descriptions to your blog posts and pages. First, open the post you need to customize.

edit post - add meta tags in wordpress

You will see the Rank Math settings. Using the Gutenberg editor, you will see the Rank Math options in the top right corner. If you use the Classic Editor, scroll to the bottom to see the configuration options.

In this case, we use the Gutenberg editor, and the Rank Math options are available in the top right corner.

add meta descriptions in wordpress - rankmath settings

You can click on it to expand the options. To add a focus keyword, use this box:

focus keyword added

You can always add multiple keywords if you are writing a pillar article. This way, you can ensure the content is well-optimized for each keyword.

Once you have added the focus keyword, click the Edit Snippet button.

edit rank math snippet

From there, you can edit the post’s SEO title, URL, and meta description. Change them according to your requirements and remember to update the post.

The live preview option lets you see every update in real time. Once you are done adding SEO titles, meta descriptions, and keywords to your article, publish or update the post.

post preview

You can follow the same method to add meta tags to your pages.

This way, you can add SEO titles, meta descriptions, and keywords to your blog posts and pages.

1.2) Category and Tags

Category and tags are two crucial things for every website. You can add meta tags and optimize them for better SEO.

Under the Posts section, you will see the Category and Tags options.

category and tags

Open the category or tags section and choose the archive you need to modify. Once you have opened the archive page, scroll to the bottom and you will see the Rank Math configuration options.

edit category

If you allow search engine crawlers to go through the category and tags archive, modifying the SEO title and meta description would be a good choice. This way, your archives in search results will stand out.

1.3) Homepage

Adding a custom SEO title and meta description to your homepage is essential. If you have configured a custom blog post, go to the dedicated homepage and edit the Rank Math SEO settings. If you are not using a dedicated homepage, go to the Titles & Meta option under Rank Math.

titles and meta

Under the homepage section, you will see options to add an SEO title and description.

homepage seo

This way, you can tweak the homepage and add meta tags correctly. Update the settings, and you are good to go.

Apart from using a plugin, you can also add meta tags to WordPress websites manually. Let’s see how to do that.

2) Add Meta Tags Manually

If you don’t want to install another plugin and have some coding knowledge, you can also add tags manually.

As we’ll edit the code of your WordPress theme, we highly recommend generating a complete website backup before moving forward. Once the backup is complete, you can move to the next step.

Go to the theme editor and you’ll see the theme editor option under Appearance.

theme editor

There, you will see the theme editor option.

theme file editor

By default, the option will open the style.css file, but we’ll add meta tags to the header.php file of the theme, so from the right-hand side, select the header.php file.

header.php file

Inside the <head> tag, you can add the meta tags.

Some commonly used meta tags are below:

<meta name="resource-type" content="document" />
<meta http-equiv="content-type" content="text/html; charset=US-ASCII" />
<meta http-equiv="content-language" content="en-us" />
<meta name="author" content="Jane" />
<meta name="contact" content="[email protected]" />
<meta name="copyright" content="Copyright (c)2010-2030
John Doe. All Rights Reserved." />
<meta name="description" content="Your meta description" />
<meta name="keywords" content="your keywords" />

Once you have added the meta tags, update the file.

meta added

This way, you can manually add meta tags to your WordPress website. If you are having trouble editing meta tags through the theme editor, you can also use an FTP client.

Bonus: Tips for Writing Meta Descriptions

A compelling meta description will help you boost your organic traffic. Since most people check the titles and meta descriptions before clicking on a search result, having a good meta description is a must.

Here are five points to help you generate the best meta description for your site:

  • Have the ideal word count: To ensure the meta description is visible in the search engine result pages, keep the character count under 160. This is important, otherwise, the description will be cut.
  • Add keywords: Adding keywords naturally to your meta description is a great idea.
  • Make it descriptive: Explain what the user will learn or get in the post. A short idea of the topic can help you boost the overall CTR.
  • Avoid keyword stuffing: Do not overuse your focus keyword in the meta description. This will affect your ranking negatively. Use the keyword naturally and add synonyms of the keyword to add variation.
  • Avoid spelling, and grammar mistakes: Avoid spelling and grammar mistakes to give your site authority. Having typos and grammar mistakes make your site look unprofessional and it may be the only opportunity you have to attract that user.

Following this guide, you can create the best meta description for your blog posts, pages, and custom post types.

Conclusion

To improve your organic traffic, you should invest in SEO. The right keyword, meta description, and title can help you rank better on search engine result pages and outscore your competitors.

In this guide, we’ve shown you different ways to add meta tags in WordPress.

  • Using a plugin
  • Manually

So which method should you use? It depends on your needs and skills. The easiest way is to use a dedicated plugin like Rank Math SEO or Yoast SEO. But if you don’t want to install plugins and have coding knowledge, you can use a bit of code to add meta tags. 

Keep in mind that if you change your WordPress theme, you will lose all the modifications you have done to the existing header.php file. Also, if the theme developer decides to update the theme files, you will lose the customization. To avoid that, you can create a child theme.

We hope you have found this article helpful and enjoyed reading it. If you did, please consider sharing this post with your friends and fellow bloggers on social media. You can check out our blog archive for more similar articles.

Which method are you going to use to add meta tags in WordPress? Let us know in the comments!

Similar articles you might like: