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
- An SEO plugin. It adds a field below the editor where you write the description for each post and page.
- Your theme's settings. Some themes have their own setting for it. Check your theme's options.
- 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
- Open the page in your browser.
- View the page source.
- 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.