WordPress

WordPress meta description: how to add and edit it

Where to write it, how long it should be and how to add it without a plugin.

← All guides, 3 min read

WordPress has no built-in field for the meta description. You add one in one of three ways: with an SEO plugin, through your theme's settings or with a few lines of code. Keep it to 155 characters or less.

What a meta description is

The meta description is the text Google can show under the title in search results. Google sometimes picks its own text from the page instead.

How long should it be

Aim for 155 characters at most, since longer descriptions are often cut off. Keep the title to 60 characters at most.

Three ways to add it

  1. An SEO plugin. It adds a field below the editor where you write the description for each post and page.
  2. Your theme's settings. Some themes have their own setting for it. Check your theme's options.
  3. Code without a plugin. See the next section.

Meta description in WordPress without a plugin

Add this code to your child theme's functions.php or to a code snippets tool. Take a backup first. The code uses the post's Excerpt as the description and also gives pages an excerpt field.

add_action( 'init', function () {
add_post_type_support( 'page', 'excerpt' );
} );

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

Then write the description in the Excerpt field of each post or page.

Do not use the code if an SEO plugin already outputs the description. You would then get two.

Check that it works

  1. Open the page in your browser.
  2. View the page source.
  3. Search for name="description".

How to write the description

  • Write a separate description for each page.
  • Say what the page offers.
  • Use the words people search for.
  • Do not repeat the same text across pages.

The Tedrix plugin

Tedrix has a WordPress plugin that is free to install and needs no account. It checks your 300 latest posts and pages for titles that Google cuts off, descriptions that are missing or too long, and duplicate titles. It writes up to 5 new suggestions a day. You see the text first, choose Use and can undo. If your site has no SEO plugin, Tedrix outputs the description itself.

With an account, connected through Connect with Google and Search Console, you also get Autopilot.

Get the plugin on wordpress.org. Want to see how your page looks in Google first? Try the free Google preview tool.

See this on your own site

Tedrix connects to your Google Search Console, finds the pages quietly losing traffic, and drafts one on-brand refresh for you to approve. Nothing is published without your approval, unless you choose autopilot yourself.

Run a free audit

One email a month about being found

What we measure on real sites: what makes pages lose visitors, what actually helps, and what turns out to be a myth. No sales blasts.

Once a month. Unsubscribe in one click, and we store nothing but the address.