Meta tags play a critical role in search engine optimization (SEO), providing search engines with essential information about a page’s content.
You can add meta tags to WordPress manually or with plugins. This guide explores both methods, and shares some best practices to maximize SEO impact.
What are meta tags and why are they important?
Meta tags are snippets of HTML code that provide metadata about a webpage. Search engines and social media platforms use them to understand and display content appropriately. Some of the most important meta tags include:
- Title Tag: Defines the page title shown in search results
- Meta Description: Provides a brief summary of the page content
- Meta Robots: Direct search engines on how to index the page
- Open Graph Tags: Optimize content for social media platforms
- Canonical Tag: Prevents duplicate content issues by specifying the preferred URL
Each of these meta tags contributes to improved search engine rankings and a better user experience.
How to add meta tags manually in WordPress
Those who prefer a hands-on approach, you can manually add meta tags to WordPress with code. Note that you should always make changes using a child theme and have a full backup of your site on hand before editing your site code.
For Classic themes: Edit the header.php file
If you’re using a Classic theme, you can use the header.php file to add meta tags to your site. Simply follow these instructions:
- Access your WordPress dashboard.
- Navigate to Appearance → Theme File Editor.
- Locate and open the header.php file.
- Add meta tags within the <head> section. Example:
<meta name="description" content="Your page description here"><meta name="robots" content="index, follow">
- Save changes.

For Classic or Block themes: Use the functions.php to add meta tags dynamically
Instead of editing the header file directly, you can add meta tags by modifying the functions.php file.
- Using your host’s file editor or SFTP software, open the functions.php file. This is found inside of your child theme folder.
- Insert the following code snippet:
function add_meta_tags() {Â Â Â Â echo '<meta name="description" content="' . get_the_excerpt() . '" />';}add_action('wp_head', 'add_meta_tags');
- Save the changes.
This method dynamically generates meta descriptions based on post excerpts.
How to add meta tags using plugins
SEO plugins greatly simplify the process of adding meta tags, provide additional functionality, and make sure that you’re implementing tags correctly. The top plugins for this purpose are Jetpack, Yoast SEO, and Rank Math.
Using Jetpack to add meta tags
Jetpack is a powerful WordPress plugin with tools for SEO, security, performance, growth, and more. Here’s how to use it to add meta tags to your WordPress site:
- Install and activate Jetpack from Plugins → Add New.
- Navigate to Jetpack → Settings → Traffic.
- Enable the SEO Tools feature.

Once you’ve enabled this feature:
- When editing a post or page, click the Jetpack icon at the top right of the block editor.
- There, add your custom title tag and meta description for the content.
- Click the blue Save button.

Jetpack also automatically adds structured meta tags, including Open Graph data, optimizing content for search engines and social media platforms.
Using Yoast SEO to add meta tags
Yoast SEO is an SEO plugin that includes advanced tools for optimizing your WordPress site. To add meta tags with Yoast on a global level:
- Install and activate Yoast SEO from Plugins → Add New.
- Go to Yoast SEO → Settings.
- Find the Content types section.
- Select the content type you want to edit (Posts, Pages, Products, etc.) and edit the default settings for meta tags.

To edit an individual piece of content:
- Open the post or page in the block editor.
- Scroll down to the bottom to find the Yoast SEO box.
- There, you can edit the meta description, SEO title, slug, and more.
- Once you’re done, save the post or page.

Yoast SEO also includes meta robots settings, Open Graph tags, structured data support, and more.
The most powerful AI tool for WordPress
Turn your ideas into ready-to-publish content at lightspeed.
Elevate your contentUsing Rank Math to add meta tags
Rank Math is similar to Yoast SEO, providing advanced SEO features and AI-based suggestions for meta descriptions. Here’s how to configure default meta tag settings with Rank Math:
- Install and activate Rank Math from Plugins → Add New.
- Complete the setup wizard.
- Navigate to Rank Math SEO → Titles & Meta.
- Configure meta title and description templates.
- Click Save Changes.

To edit meta tags on an individual page/post basis:
- Open your page or post in the block editor.
- Click the Rank Math button at the top right (it will show your current SEO score).
- Make any edits you’d like.
- Click Save.

Best practices for optimizing meta tags
To maximize SEO impact, follow these best practices when adding meta tags:
- Write compelling meta descriptions: Keep them under 160 characters and include primary keywords.
- Optimize title tags: Ensure that they’re under 60 characters and feature your main keyword at the beginning, if possible.
- Use the meta robots tag wisely: Set noindex for pages that should not appear in search results (e.g., admin pages, thank you pages).
- Implement the Open Graph protocol: Enhance how content appears on social media platforms.
- Avoid duplicate meta tags: Use canonical tags to prevent indexing of duplicate content.
Monitoring and testing meta tag effectiveness
After implementing meta tags, track their impact using SEO tools like:
- Google Search Console: Analyzes search performance and highlights issues with content
- Google Analytics: Tracks organic traffic and visitor behavior
- Schema Markup Testing Tool: Ensures that structured data is correctly implemented
How to maximize SEO with meta tags and AI content
Adding and optimizing meta tags in WordPress is a critical part of SEO, enhancing search visibility and user engagement.
To further improve your SEO strategy, consider integrating Jetpack AI Assistant into your content creation workflow. This AI-powered tool, seamlessly embedded within the WordPress editor, offers a suite of features designed to streamline and elevate your content efforts.
Efficient meta tag generation
Crafting precise and compelling meta tags is essential for SEO success. Jetpack AI Assistant simplifies this process by:
- Creating meta descriptions: It can analyze your content and generate concise, compelling meta descriptions.
- Optimizing title tags: It can suggest impactful titles that resonate with both search engines and readers.
Content enhancement for SEO
Beyond meta tags, Jetpack AI Assistant contributes to overall SEO by:
- Adjusting tone: It modifies your content tone to align with your brand voice and audience preferences.
- Correcting grammar and spelling: It ensures error-free content that maintains professionalism.
These features collectively enhance content quality, making it more appealing to both readers and search engines.
Seamless integration and usability
Jetpack AI Assistant integrates directly into the WordPress block editor, offering:
- A user-friendly interface: Accessible tools within your existing workflow
- Prompt-based content generation: The ability to create content, lists, and tables based on your prompts
- Multilingual support: Content translation to reach a broader audience.
This seamless integration ensures that enhancing your SEO strategy with AI capabilities is both intuitive and efficient. Learn more about Jetpack AI Assistant here: https://jetpack.com/ai/
The most powerful AI tool for WordPress
Turn your ideas into ready-to-publish content at lightspeed.
Elevate your content