Get In Touch
Gurugram
Plot # 1SP, Sector 27, Golf Course Rd, A Block, DLF Phase 1, Sector 27, Gurugram, Haryana 122022, India

Bengaluru
#103, 2nd floor, Unitech Coral Hosa Road, Sarjapur, Bengaluru, Karnataka 560035, India
Work Inquiries
info@creativenexus.in
prabhu@creativenexus.in
rishabh@creativenexus.in
Phone
+91 9999212010
+91 9019321894
+91 98686 57429

How To Add Meta Tags in WordPress

Table of Contents

Meta tags are a crucial part of your website’s SEO strategy, providing search engines and browsers with important information about your content. In WordPress, adding meta tags can be done in various ways, from manually editing theme files to using plugins. This guide will walk you through the most common methods.

Understanding Meta Tags

Meta tags are snippets of text that describe a page’s content; they don’t appear on the page itself but only in the page’s code. Common meta tags include the meta description, keywords, and viewport settings. These tags help search engines understand the content and relevance of your website, which can impact your rankings.

Method 1: Adding Meta Tags Manually

Editing the header.php File

One of the easiest and straightforward ways to add meta tags is directly editing your header.php file. This is the place where meta tags are placed and also controls what appears in the <head> section of your HTML. You’ll need some technical know-how to pull this off. Therefore we have enumerated all the necessary steps that you might require.

  1. Access the Theme Editor: First of all, you’ll need to access the theme editor of your WordPress. Navigate to Appearance and then to the Theme File Editor. There you’ll find all the necessary files of your website.

  2. Locate header.php: Once you have accessed the theme editor, now it’s time to locate the header.php file.

  3. Add Meta Tags: Once you have located the header.php file, now it’s time for you to add the meta tag. You’ll have to add your meta tag in the <head> section. Below is the complete code for it:

html
<meta name="description" content="Your page description here">
<meta name="keywords" content="keyword1, keyword2, keyword3">
  1. Save Changes: Once you have changed the meta tag, save changes by clicking on the update file button.

Note: Never make changes in your parent theme as when you edit the parent theme, new updates will overwrite your changes. To avoid this, always use a child theme.

Adding Meta Tags Using the functions.php File

You can also edit the meta tags for your website through the functions.php file. Let’s have a look at how to do so:

  1. Access the functions.php File: Accessing the functions.php file is the same as accessing header.php. First, go to Settings in Appearance and click on Theme File Editor. There you can find the functions.php file on the right-hand side.

  2. Add Meta Tags with PHP: Add the following PHP code to insert meta tags:

php
function add_custom_meta_tags() {
echo '<meta name="description" content="Your page description here">';
echo '<meta name="keywords" content="keyword1, keyword2, keyword3">';
}
add_action('wp_head', 'add_custom_meta_tags');
  1. Save Changes: Once you’re done with the changes that you want to do, save and update the file.

Tip: Always back up your website before making changes to functions.php, as errors in this file can break your site.

How To Add Meta Tags in WordPress Using Plugins

If you’re not comfortable with coding, then worry not—WordPress also provides a flexible approach to this issue. WordPress has several SEO plugins that allow you to add and manage meta tags without even looking at the code.

Add Meta Tags Using Yoast SEO

Yoast SEO is one of the most popular SEO plugins for WordPress, offering an easy way to manage meta tags.

  1. Install Yoast SEO: First, go to the Plugins section of your WordPress and search for Yoast SEO. Then click on the Install button and activate it.

  2. Add Meta Tags: Open the edit window of the page and scroll down to reach the Yoast SEO meta box. Enter the focus key phrase and meta descriptions in the appropriate fields.

  3. Save Changes: Update your post or page to save the meta tags.

Adding Meta Tags to WordPress Using All in One SEO (AIOSEO)

Another great option is the All in One SEO plugin, which offers comprehensive meta tag management.

  1. Install AIOSEO: Go to the Plugins section of your WordPress and search for All in One SEO. Click on the Install button and then activate it.

  2. Configure Meta Tags: Navigate to All in One SEO General Settings. After that, scroll down to the meta tag sections and enter your desired meta tags. Click on the Save button to save changes.

Adding Meta Tags Using Meta Tag Manager

Meta Tag Manager is another famous plugin for WordPress. It is a dedicated plugin for handling meta tags.

  1. Install Meta Tag Manager: First, go to the Plugins section and search for Meta Tag Manager. After installing, click the Activate button to start its services.

  2. Add Meta Tags: After activation, go to Settings of the Meta Tag Manager. Add your meta tags using the simple interface. Save the settings, and your meta tags will be applied across your site.


Adding meta tags in WordPress is an essential step for optimising your website’s SEO. Whether you choose to add them manually through code or use one of the many available plugins, ensuring that your site has the correct meta tags will help improve its visibility and relevance to search engines. Always consider backing up your site before making any changes, especially when editing core files. By following this guide, you’ll be well on your way to mastering meta tags in WordPress, helping your site to rank better and attract more visitors.

Frequently Asked Questions Related To How To Add Meta Tags in WordPress?
What are meta tags in WordPress?
Meta tags are HTML elements that provide metadata about your website to search engines and browsers. They help improve SEO by making your content more discoverable.
Can I add meta tags without a plugin?
Yes, you can manually add meta tags by editing your theme’s `header.php` or functions.php file. However, using a plugin is easier and safer for most users.
Which is the best plugin for adding meta tags in WordPress?
Yoast SEO and All in One SEO are two of the most popular plugins for adding and managing meta tags. Both offer comprehensive features for optimising your site’s SEO.
Will adding meta tags improve my SEO?
Yes, properly configured meta tags can improve your website’s visibility on search engines, though they are just one part of a broader SEO strategy.
Do I need coding skills to add meta tags in WordPress?
Not necessarily. While coding skills can help you manually add meta tags, many plugins allow you to add them without any coding knowledge.

Leave a Reply

Your email address will not be published. Required fields are marked *

We use cookies to give you the best experience. Cookie Policy