Hesam Seyedi ● April 8, 2025
Ever wonder why some pages get clicks—and others get ignored? It comes down to meta tags.
These small snippets control how your content shows up in search results. Mess them up, and your page blends into the noise. Get them right, and you grab attention before anyone even lands on your site.
Here’s the kicker: a solid meta description can boost your click-through rate by up to 5.8%. That’s traffic you’re already earning—if your tags do their job.
In this guide, you’ll learn how to add meta tags in WordPress the right way—whether you’re using plugins or adding them manually.
Let’s make sure your content actually gets clicked.
Before we get into how to add them, let’s quickly cover what meta tags are—and why they’re worth your attention.
Meta tags are small pieces of HTML code that sit in the head section of your WordPress site. They don’t show up on the page itself, but search engines use them to understand your content and decide how to display it in results.
Here are the ones that matter most:
Search engines have evolved, and some meta tags (like keywords) have faded in importance. But others—especially title and description—still influence how users interact with your content in search. And better click-through rates mean more traffic, even if rankings stay the same.
Now that you know what they are, let’s look at the different ways you can add meta tags to your WordPress site.
Now that you understand what meta tags do, let’s talk about how to actually add them.
WordPress doesn’t include built-in support for custom meta tags, but the good news is: you’ve got options.
You can add meta tags manually by editing your theme’s files, use a plugin that handles everything for you, or take a hybrid approach using a lightweight code snippets tool.
Which method you choose depends on your comfort level with code and how much control you want.
Let’s break down each method so you can choose what works best for your site.
If you’re comfortable working with theme files, you can insert meta tags directly into your site’s code. This gives you full control, but it does come with a small risk—making changes in the wrong spot can break your layout. So proceed carefully, and always back up your theme before editing.
a. Using header.php
The header.php file controls everything inside your site’ssection. Here’s how to add meta tags there:
1. In your WordPress dashboard, go to Appearance > Theme File Editor.
2. Select header.php from the list on the right.
3. Inside the < head > section, paste your meta tags, like this:
<meta name="description" content="Your custom meta description here">
<meta name="keywords" content="keyword1, keyword2, keyword3">
4. Save your changes.
b. Using functions.php (for Dynamic Meta Descriptions)
1. Go to Appearance > Theme File Editor and open functions.php.
2. Add this code:
function custom_meta_description() {
if (is_single() || is_page()) {
global $post;
$excerpt = strip_tags($post->post_excerpt ?: $post->post_content);
$excerpt = mb_substr($excerpt, 0, 160, 'UTF-8');
echo '<meta name="description" content="' . esc_attr($excerpt) . '">' . "\n";
}
}
add_action('wp_head', 'custom_meta_description');
If editing code feels like more risk than reward, you’re not alone. Most WordPress users rely on plugins to handle meta tags—and for good reason.
Plugins simplify the process, reduce errors, and offer more flexibility when managing SEO across dozens or hundreds of pages.
There are several reliable options, but three stand out for their ease of use and functionality.
Yoast is one of the most widely used SEO plugins for WordPress—and for good reason. Once installed, it adds a meta box below each post or page where you can customize:
Yoast also lets you set meta robots settings (like noindex) and includes social media tag support via its “Social” tab.
If you prefer a slightly different layout with more control over technical SEO, AIOSEO is another strong choice. It offers similar features to Yoast but includes deeper control over:
To add meta tags with AIOSEO:
If you only want to insert custom meta tags without a full SEO suite, Meta Tag Manager is a lightweight alternative. It’s ideal for adding specific tags like:
meta tags for individual pagesHere’s how to use it:
Plugins make managing meta tags scalable and simple—especially for growing websites. But what if you want something in between—more control than a plugin, but less risk than editing theme files?
There’s a solution for that too. Let’s look at it next.
If you like the idea of custom code but want a safer way to manage it—without touching theme files—the Code Snippets plugin strikes the perfect balance. It lets you insert PHP code directly into your site’s functions without editing core files, which means fewer risks and easier updates.
This is a smart option for site owners who want more control than a plugin offers, but don’t want to break anything in the process.
1. Go to Plugins > Add New and install Code Snippets
2. Click Snippets > Add New
3. Add a title like “Meta Description Generator”
4. Paste in a function like this:
function custom_meta_description_snippet() {
if (is_single() || is_page()) {
global $post;
$excerpt = strip_tags($post->post_excerpt ?: $post->post_content);
$excerpt = mb_substr($excerpt, 0, 160, 'UTF-8');
echo '<meta name="description" content="' . esc_attr($excerpt) . '">' . "\n";
}
}
add_action('wp_head', 'custom_meta_description_snippet');
5. Save and activate the snippet
That’s it.
Your site will now output dynamic meta descriptions pulled from your post content—no theme file edits required.
You can also use this method to add other meta tags, like robots or verification codes, by tweaking the function.
So far, we’ve covered three reliable ways to add meta tags to WordPress—whether you’re a beginner or comfortable with code.
But adding them is only half the story. Next, let’s talk about how to check if they’re actually working.
So far, we’ve covered three reliable ways to add meta tags to WordPress—whether you’re a beginner or comfortable with code.
But adding them is only half the story. Next, let’s talk about how to check if they’re actually working.
Adding meta tags is a great step—but how do you know they’re showing up correctly? Whether you used a plugin, added code manually, or used the Code Snippets plugin, it’s important to verify that your tags are in place and displaying as expected.
Here are a few simple ways to check your meta tags:
This is the fastest method.
< head > sectionYou should see lines like this:
<meta name="description" content="Your page description here">
< head >section to see all meta tagsGo to:
Tools like SEOquake, Screaming Frog SEO Spider, and Ahrefs Site Audit can scan your site for missing, duplicate, or poorly optimized meta tags. They’re especially useful for larger websites where manual checks aren’t practical.
Once your tags are confirmed and working, you’re in a strong position.
But don’t stop there—let’s look at a few best practices to make sure your meta tags aren’t just showing up, but actually helping your site perform better.
Now that your meta tags are in place and working, the next step is making sure they’re effective.
Just having meta tags isn’t enough—they need to be written in a way that grabs attention, encourages clicks, and accurately represents your content.
Here are a few simple but impactful best practices to follow:
Don’t stuff your meta tags with keywords.
Instead, think about what would make you click. Use natural language that clearly explains what the page offers.
Each page on your site should have a unique title and meta description.
Duplicate tags confuse search engines and can hurt your click-through rate.
Include your primary keyword near the beginning of your title and meta description—but only if it makes sense.
Prioritize readability over repetition.
Think of your meta description as a mini sales pitch. What will the user get from clicking your result? Make it specific and outcome-driven.
Example:
Done right, meta tags help users and search engines understand your content better. And when users understand what they’re clicking on, they’re far more likely to actually click.
Next up—let’s talk about a few common mistakes to avoid so your tags don’t end up working against you.
Even though meta tags are easy to set up, it’s just as easy to overlook the small details that can undercut their impact.
Let’s run through some of the most common mistakes site owners make—so you can steer clear of them.
If you don’t write one, Google will try to generate it for you.
The result? A random chunk of text that may not reflect your content or value. Take control by writing your own.
Cramming a string of keywords into your title or description doesn’t help—and can actually hurt your credibility. It looks unnatural, turns users off, and adds no real SEO benefit.
Accidentally setting a page to noindex or nofollow can block search engines from including it in results. Always double-check robots tag settings, especially on important pages.
Avoiding these pitfalls can make a noticeable difference in how your pages perform in search.
But to really understand the value meta tags bring, it helps to look at them as part of a bigger picture—which we’ll wrap up with next.
Meta tags might feel like a small detail—but in a competitive search landscape, small details matter. They shape how your content appears in Google. They influence first impressions. And when written well, they can be the difference between a user clicking your link or skipping past it.
Whether you added them manually, used a plugin, or went with the Code Snippets approach, what matters most is that you have control over how your pages are presented in search.
To recap:
Adding meta tags won’t fix a weak site—but when combined with quality content and a solid SEO strategy, they give your pages a better shot at being seen and clicked.
Start simple. Test results. And keep refining.
Meta tags might not grab your visitors’ attention—but they’ll help make sure you get the chance.
Yes. While meta tags like keywords are no longer used for rankings, title and description tags still play a major role in how your content appears in search. A clear, compelling meta description can significantly boost click-through rates.
Check your site’s source code or use browser developer tools to see if the tags are showing correctly. For a more detailed check, use tools like Google Search Console or SEO auditing tools like Screaming Frog or SEOquake.