Table of contents
Get the industry’s fastest hosting for WordPress◦ 100% network uptime
◦ Comprehensive security
◦ 24/7 support

WordPress GuideSEO → Meta Tags

How to add meta tags in WordPress

seo for wordpress

If you’re using WordPress, you may come across meta tags when editing or posting to your site. To break it down, meta is an underlying description while tags are customized for all types of content defined in the page’s source code. In simpler terms, meta tags help Google find your site.

When search engines index your website, they collect information from the title, headings, content, and meta tags. Search engines compare the language in each of these sections and rank the website depending on how the information matches.

WordPress doesn’t support meta tags by default, but meta tags can be added manually using theme template files or through WordPress plugins.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

What are WordPress meta tags?

Meta tags are HTML elements that provide information about the contents of a webpage to search engines and browsers that are then displayed in search engine results. The most important meta tags for SEO are:

While meta tags have been important historically, Google no longer uses them to determine ranking. Instead, they are now more helpful in improving click-through rates (CTR), as descriptive titles and compelling meta descriptions that accurately represent your content can encourage clicks from search results.

How to add meta tags to WordPress: 3 methods to try

Now, let’s discuss how to add meta tags to WordPress. There are two ways to add meta tags to your WordPress website. You can add meta tags manually by editing header.php or functions.php files, or you can add them with the help of WordPress meta tags plugins.

How to add meta tags in WordPress with a plugin

If you are looking for a faster and easier way to add meta tags to your WordPress website, you can use WordPress plugins. Various options are available for those who want to add meta tags with plugins. You can choose the right plugin as per your requirements. Below, we’ll walk through three plugin options for adding meta tags to WordPress.

1. Yoast SEO

You can find the Yoast SEO section under any post or page you’ve edited once you activate the Yoast SEO plugin.

Yoast includes fields like focus keyphrase, SEO title, slug, and meta description.

The focus keyphrase is the search term that you want your page to rank for. The SEO title is the page title. For better results, use your focus keyword in the page title and keep it under 60 characters. The slug is a part of your URL that describes the content of a page or post. The meta description appears under the page or post title on Google and provides information about the content.

2. All in One SEO (AIO SEO)

You can find the All in One SEO section under any post or page once you activate the plugin.

Fields such as post title, meta description, and focus keyphrase need to be filled out as per your requirements in the All in One SEO (AIO SEO) settings.

3. Meta Tag Manager

Once the Meta Tag Manager plugin is installed, you can access it at Settings > Meta Tag Manager.

You can use Meta Tag Manager to add custom meta tags for specific pages, or you can enable meta tags for specific content types like page, media, and post.

To add the Meta Description Tag for the front page, go to Settings > Meta Tag Manager > Custom Meta Tags section. Click on the Add Meta Tag button, configure the meta description tag as shown in the screenshot, and then save the changes.

If you check the source code of your front page, you can see the following meta tag has been added by the Meta Tag Manager plugin.

<meta name=”description” content=”This is a demo site” />

You can add as many meta tags for your pages as per your requirements.

To enable the meta tag builder for specific content types, such as a post, go to the Settings > Meta Tag Manager and then click on General Options. Then select the posts content type and save your changes.

Now, create a new post and you can see the meta tag builder is added to it. Please refer to the screenshot.

This way, you can use the meta tag builder for different content types.

How to add meta tags in WordPress manually

You can add meta tags to WordPress by editing header.php using the following steps.

1. Find and open the header.php file

Go to Appearance and click on “Theme File Editor.”

Click on the header.php under Theme Files to open the header.php file.

Note: You can also access and edit the header.php file from wp-content/themes/{YOUR_THEME}/header.php via FTP/SSH

2.  Copying and customizing meta tags

Copy the following generic code and fill it in with the keywords you’re trying to target. Place it under the <head> tag:

<meta name=”keywords” content=”keywords related to the content of the website” />

Then, copy the following generic description meta tag and paste it under the previous line:

<meta name=”description” content=”meta description for the content of the website” />

How to add meta tags in WordPress using functions.php

You can add meta tags to WordPress by editing functions.php using the following steps.

1. Find and open the functions.php file

Go to Appearance and click on “Theme File Editor.”

Click on functions.php under Theme Files to open the functions.php file.

Note:  You can also access and edit the functions.php file from wp-content/themes/{YOUR_THEME}/functions.php via FTP/SSH

2.  Copying and customizing meta tags

Add the following code to the functions.php file.

In this article, we have added the hueman_add_meta_tags custom function, which will add meta tags to the different pages of your website. We have also used the wp_head hook to add meta tags to your pages. You can replace hueman_add_meta_tags with your own theme name.

How to test your meta tags

You can verify if your meta tags work correctly using several methods.

These tools can help identify missing meta descriptions, titles that are too long, or duplicate meta content that needs fixing.

Meta tag FAQs

To find meta tags in your WordPress site, look in your theme’s template files. Within those files, look for the tag. If you’re using a WordPress plugin to add meta tags, such as Yoast SEO, look at the SEO Title and Meta Description fields.

Go to the Meta Tag Manager under your WordPress settings. Click Add Meta Tag. From there you can add meta keywords and a description for any page or post on your site. Meta keywords can help people find your website on Google.

No, meta tags are not included in WordPress by default. It is up to you to add meta tags to your WordPress website. It can easily be done in your theme template files, or with a number of plugins.

It’s simple to add meta tags in WordPress. You can easily do so with a plugin. Just follow these steps.

Additional resources

How to build a WordPress site →

A complete beginner’s guide

5 best SEO plugins for WordPress →

Did you know that there are also other well viable options on the market as well? SEO Optimization tool Rank Math has built a huge and successful community in a short period.

How to find the best hosting for SEO →

The WP Toolkit includes many valuable features for updates and security

Amanda Valle is Global Director of Organic Search at Liquid Web and a seasoned SEO, user acquisition, digital marketing leader. She has 20+ years of experience in digital marketing, SEO, and content marketing, and holds certifications from SEMrush and Google Analytics. When she’s not driving revenue, she enjoys spending time with her girls.