Jetpack 101

How to Add Meta Tags in WordPress to Boost SEO Results

two people working on a computer

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:

  1. Access your WordPress dashboard.
  2. Navigate to Appearance → Theme File Editor.
  3. Locate and open the header.php file.
  4. Add meta tags within the <head> section. Example:
<meta name="description" content="Your page description here">
<meta name="robots" content="index, follow">
  1. Save changes.
editing the header.php file in WordPress

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.

  1. Using your host’s file editor or SFTP software, open the functions.php file. This is found inside of your child theme folder. 
  2. Insert the following code snippet:
function add_meta_tags() {
    echo '<meta name="description" content="' . get_the_excerpt() . '" />';
}
add_action('wp_head', 'add_meta_tags');
  1. 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:

  1. Install and activate Jetpack from Plugins → Add New.
  2. Navigate to Jetpack → Settings → Traffic.
  3. Enable the SEO Tools feature.
SEO settings in Jetpack

Once you’ve enabled this feature:

  1. When editing a post or page, click the Jetpack icon at the top right of the block editor.
  2. There, add your custom title tag and meta description for the content.
  3. Click the blue Save button.
adding an SEO description to a page

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:

  1. Install and activate Yoast SEO from Plugins → Add New.
  2. Go to Yoast SEO → Settings.
  3. Find the Content types section.
  4. Select the content type you want to edit (Posts, Pages, Products, etc.) and edit the default settings for meta tags. 
Yoast SEO post meta data settings

To edit an individual piece of content:

  1. Open the post or page in the block editor.
  2. Scroll down to the bottom to find the Yoast SEO box.
  3. There, you can edit the meta description, SEO title, slug, and more. 
  4. Once you’re done, save the post or page.
adding a meta description using Yoast SEO

Yoast SEO also includes meta robots settings, Open Graph tags, structured data support, and more.

AI

The most powerful AI tool for WordPress

Turn your ideas into ready-to-publish content at lightspeed.

Elevate your content

Using 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:

  1. Install and activate Rank Math from Plugins → Add New.
  2. Complete the setup wizard.
  3. Navigate to Rank Math SEO → Titles & Meta.
  4. Configure meta title and description templates.
  5. Click Save Changes.
adding SEO data using RankMath

To edit meta tags on an individual page/post basis:

  1. Open your page or post in the block editor.
  2. Click the Rank Math button at the top right (it will show your current SEO score). 
  3. Make any edits you’d like.
  4. Click Save.
setting a focus keyword with RankMath

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:

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/

This entry was posted in Grow. Bookmark the permalink.
Grow

Jen Swisher profile

Jen Swisher

Jen is a Customer Experience Specialist for Jetpack. She has been working with WordPress and Jetpack for over a decade. Before starting at Automattic, Jen helped small businesses, local non-profits, and Fortune 50 companies create engaging web experiences for their customers. She is passionate about teaching others how to create on the web without fear.

AI

The most powerful AI tool for WordPress

Turn your ideas into ready-to-publish content at lightspeed.

Elevate your content

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.