How to Set Meta Description in WordPress Easily
To set a
meta description in WordPress, use an SEO plugin like Yoast SEO or All in One SEO which provides a simple field to enter your description. Alternatively, you can add a custom meta tag in your theme's header.php file inside the <head> section.Syntax
The meta description tag in HTML looks like this:
<meta name="description" content="Your description here" />
In WordPress, this tag is usually added inside the <head> section of your theme files or generated by SEO plugins.
name="description": tells browsers and search engines this is the meta description.content="...": the actual text describing your page.
html
<meta name="description" content="Your page description here" />
Example
This example shows how to add a meta description manually in a WordPress theme by editing the header.php file.
php
<?php // Inside your theme's header.php file, add this inside the <head> section ?> <meta name="description" content="Welcome to my WordPress site where you find great tutorials." />
Output
<meta name="description" content="Welcome to my WordPress site where you find great tutorials." />
Common Pitfalls
- Not using an SEO plugin or custom code means WordPress may not output a meta description, hurting SEO.
- Adding multiple meta description tags can confuse search engines; only one should exist per page.
- Editing theme files directly can be lost on theme updates; use a child theme or plugins instead.
- Leaving the description empty or too short reduces SEO effectiveness.
php
<?php // Wrong: multiple meta descriptions ?> <meta name="description" content="First description." /> <meta name="description" content="Second description." /> <?php // Right: only one meta description ?> <meta name="description" content="Correct single description." />
Quick Reference
- Use SEO plugins like Yoast SEO or All in One SEO for easy meta description management.
- To add manually, place
<meta name="description" content="..." />inside<head>inheader.php. - Use child themes to avoid losing manual changes on updates.
- Keep descriptions concise (about 150-160 characters) and relevant.
Key Takeaways
Use SEO plugins like Yoast SEO for easy meta description setup without coding.
The meta description tag goes inside the section of your theme files.
Avoid multiple meta description tags on the same page to prevent SEO issues.
Use a child theme or plugins to keep manual changes safe from theme updates.
Write clear, concise descriptions around 150-160 characters for best SEO results.