★ Black Friday★ Cyber MondayWeb hosting up to 85% off, checked on each host’s own siteGrab the deals →

How to Add a Meta Description in WordPress (With or Without a Plugin, 2026)

In 2006 WordPress didn’t create a meta description for each post, so we edited header.php and used conditional tags to print the excerpt. WordPress core still doesn’t add one, but SEO plugins now make it a one-field job. Here’s how to add a meta description in WordPress in 2026, with or without a plugin.

Meta description in WordPress

Quick answer: Install an SEO plugin such as Rank Math, Yoast SEO or All in One SEO, open any post, and type your description into the plugin’s snippet editor (aim for about 120-160 characters with your main keyword). Without a plugin, add a small function to your theme’s functions.php that prints the post excerpt as a meta description in wp_head.

What a meta description does

The meta description is a short summary in your page’s HTML head. Search engines may show it under your title in results. It isn’t a direct ranking factor, but a clear, relevant description can improve clicks. Google often rewrites it to match the search, so write it for people, not just keywords.

Add a meta description in WordPress with a plugin

Rank Math

  1. Edit the post and open the Rank Math panel.
  2. Click Edit Snippet and type in the Description field.
  3. Set a default template for posts under Rank Math > Titles & Meta.

Yoast SEO

  1. Scroll to the Yoast SEO box below the editor (or open the sidebar).
  2. Fill in the Meta description field in Search appearance.

All in One SEO and SEOPress

Both add a Meta Description field under the editor, with character counters and previews.

Add a meta description without a plugin

Use a child theme or a code snippets plugin and add:

add_action('wp_head', function () {
  if (is_singular()) {
    $desc = wp_strip_all_tags(get_the_excerpt());
    echo '<meta name="description" content="' . esc_attr(wp_trim_words($desc, 30)) . '">' . "\n";
  }
});

Write a custom excerpt for each post (enable Excerpt in the editor sidebar) for better results. Don’t use this alongside an SEO plugin, or you’ll get duplicate tags.

Watch out for automatic descriptions

Plugins and code that build the description from the first 20 or 30 words of a post have a catch, which we learned in 2007 with the Head Meta Description plugin. If your opening sentences are an anecdote or background, the description may say nothing about the page. Either write a custom excerpt or description for important posts, or get into the habit of putting a one-line summary with your main keyword in the first sentence. SEO plugins have the same issue: Rank Math and Yoast fall back to the opening text when you leave the description empty.

Meta description best practices

  • Keep it around 120-160 characters so it isn’t cut off.
  • Include the main keyword naturally; Google bolds matching words.
  • Make each description unique.
  • Summarise the benefit or answer, and add a reason to click.
  • Avoid quotes and keyword stuffing.

Check your meta description

Google explains how it picks snippets in its snippet documentation (external site).

View the page source (Ctrl+U) and search for name=”description”, or use the URL Inspection tool in Google Search Console. For more SEO settings, see how to noindex archive subpages with Rank Math and Yoast.

FAQ

Does WordPress add meta descriptions automatically?

No. WordPress core doesn’t, so you need an SEO plugin or custom code.

Should I let my plugin generate meta descriptions automatically?

Only as a fallback. Automatic descriptions use the first lines of the post, which may not summarise it. Write custom descriptions for your most important pages.

Why does Google show a different description?

Google rewrites snippets when it thinks other text on the page better matches the search.

How do I add a meta description to my WordPress homepage?

In Rank Math or Yoast, set it under the homepage settings, or edit the static front page’s SEO field.

Stuck on a gift? Try our free Gift Idea GeneratorIdeas for anyone by age, job, interests and budget, with Amazon.com and Amazon.in linksFind gifts →

Found this useful? Share it with someone who needs it.

Get our free weekly email: new tech guides and tools, no spam.

New and updated tech guides, a free tool worth bookmarking and one useful pick, once a week. No spam, unsubscribe anytime.

One email a week. Unsubscribe anytime. See our privacy policy.

Related Tech Guides

Leave a Reply

Your email address will not be published. Required fields are marked *

19 Comments

  1. Thanks a lot for sharing :)
    I’m new to WordPress and I’m pretty sure I’ll be back to QuickOnlineTips for more.

  2. meta tags used to be more helpful, providing important information to the Internet browser. However, Google does no longer use the meta keyword and Covering all the reasons meta tags are and aren’t important to search engines though.

  3. Thanks! , though am using wordpress which has all in one seo for the description this could be useful for my non-wordpress websites!!

    1. Hey Nisha.
      WordPress is the Best Platform for Blogging and happy to hear that more users are bouncing into WP.
      Cheers.

  4. People who understand WordPress code seem to get this. However, I don’t understand how, why and where to insert Meta Descriptions — nor how to check if they came through correctly. Could you help with that? Thank you!

    1. View Source of the page in the browser, and the code will be seen between the HEAD tags.

  5. Thanks for sharing the tips. At last i now understand the work of meta description and meta tags plus how to impliment them.

  6. Thanks for the helpful tips and advice! I’ll try to implement them immediately.

  7. Exceptional site, where did you come up with the info in this piece of content? I’m pleased I found it though, ill be checking back soon to see what other articles you have.

  8. Just wanted to point this one out: if you want a description for only the landing page, you can use this code:

  9. Thank you so much, I’ve spent ages trying to get this to work with various plug-ins. One line of php was all it took. Thank you!

  10. I tried to submit my site to MS Live Search engine. It generates me a meta name which I need to include in the index page of my site.

    How can I do this? My blog site is WordPress and in my home directory I only see index.php
    How can I insert the meta name like this:

    this space is contains alphanumeric characters

    Thanks.

  11. Do you use a plug-in? If so, which one? And, are meta tags completely unassociated with the tags created by plug-ins like Ultimate Tag Warrior?

    There is a lot of confusing reading to be found on the subject of meta tags. I keep reading that search engines completely ignore meta tags due to their misuse by spammers over the years.