LetSOT Tutorials How to Add Meta Tags in WordPress

How to Add Meta Tags in WordPress

When search engines index your website, you want them to understand more deeply. That way, they can do a better job of displaying the page in the browser.

Luckily, you can set what information will show in search results by adding meta tags to your website.

With meta tags, it allows you to display content to client browsers and encourage them to click on it.

In this article, we will discuss what meta tags are and why they are important for websites. Along with how to install meta tags with and without plugins.

What are Meta Tags?

A meta tag is an html code that describes the content of a website page. Using these meta tags, you can tell search engines about the content of the page and provide the content to show in search results.

Why are Meta Tags Important?

Meta Tags are no longer as important as they used to be, because search engines like Google no longer use meta tags as a determinant of page rank.

However, this doesn’t mean you should ignore it. After all, the function of the meta tag is to provide a description of the page that will be displayed in search results, which can increase your Click-Through Rates (CTR).

How to Install Meta Tags in WordPress

Installing meta tags in WordPress you can use two methods, namely by using a plugin and without a plugin.

For those of you who are new to WordPress, it is better to use the easiest method such as using a plugin. But if you are used to using code follow the guide below.

Method 1: Using Yoast SEO Plugin

There are many plugins that you can use to install meta tags. But we will be using the Yoast SEO plugin in this guide. Here’s how:

1. First, all you have to do is install and activate the Yoast SEO plugin. For more details, you can see our article on how to install a WordPress plugin.

2. Once enabled, go to Pages > All Pages or Post > All Posts. Depends on what content you will add meta tags and select the post you want to edit. Then scroll down until you see Yoast SEO.

Yoast in post

3. Enter keywords into the ‘Focus keyphrase’ section, and enter your meta description. This will be displayed in search engine results, and should be a short paragraph that describes the content and can entice visitors to click.

Add description

Method 2: Adding Meta Tags Without Plugins

Although Yoast SEO is the easiest way to add meta tags to WordPress. But you can add meta tags without a plugin.

Later you will have to add the html code manually to the header.php file of your WordPress theme. Here’s how:

1. To add meta tags in WordPress without a plugin, you need to open the WordPress theme’s header.php file. In the WordPress admin area, click Appearance > Theme Editor.

Open theme file editor

2. Then on the right side panel, you select header.php.

Open header file

3. Once the file is open, find the <head> tag. Meta data must be placed inside the tag.

4. Next, copy the following meta keyword tag and paste it under the <head> tag.

5. Then copy the description meta tag, and paste it below the previous line.

You can replace the bolded words above according to your content. Both should be optimized for your website content as a whole.

Method 3: Use Conditional Tag Queries

If you want different descriptions to display a single post and multiple posts, you can do that using the following code.

1. In your WordPress admin area, go to Settings > General and enter your meta description into the Tagline section.

Open general menu

2. Then, add the query conditional tag below to your WordPress theme’s header.php file.

The query tag above will display the post title in a single post. As an alternative, the blog name and description will appear in some posts.

Knowing how to install meta tags in WordPress is easy enough even for beginners. You can use the Yoast SEO plugin to dynamically apply meta tags to each post.

You can also manually add meta tags to your WordPress theme’s header.php file using queries.

7 Likes

Author: Reza Istiawan

Leave a Reply

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

3 Comment