How To Add Meta Tags In WordPress Without A Plugin

How To Add Meta Tags In WordPress Without A Plugin

In SEO, meta descriptions and adding keywords are essential. These will help people to know what your website is all about without scrolling all through the pages. ? This article will help you to know how to add meta tags in WordPress without a plugin.

When you follow the correct SEO instructions regarding your meta tags’ structures, you can reach the first page in the search results. If you then optimize your meta descriptions according to the SEO rules, you’ll reach organic traffic in no time.

One of the challenges you might encounter in WordPress is that it doesn’t have built-in support for meta tags. This means you need to optimize it on your own. When you go through a different website, you will see that website owners have different ways of putting meta tags on their pages.

You can edit the meta descriptions on the codes directly, or you can install a third-party plugin for that purpose. However, the following will help you how to add meta tags in WordPress without a plugin.

What is a Meta Tag?

It is firstly important to learn the meaning of a meta tag. The meta tag shows the summary or snippet of what your page is all about to the readers.

It is one of the essential parts of your content. A search engine can crawl to your page without a problem if you optimize it with the right keywords and useful information. That’s why you need to include the meta title, meta description, and canonical URL.

To make your meta tags efficient for SEO, you should put the copyrights, type of document, description, keywords, author, and core information regarding the web page or post. Above all these meta tag inclusions, the description tag is the most important one.

The typical format of a meta tag is similar to this:

<meta name="description" content="This is the description sentence or short paragraph about the article or post." />

Until recently, Google presented only 150 characters from the meta tag description. Now their latest algorithm update shows 300 characters. So you need to be mindful of your description’s number of characters.

What are Meta Tags’ Three Main Parts?

When building your SEO site structure, you need to use the three main parts of meta tags: the Title, Description, and Keywords. Using these three parts makes it easier to establish your meta tag. Eventually, you will learn how to add meta tags in WordPress without a plugin.

Title Tag

Sometimes, you cannot read the title tag on the article if the author has written the title tag and the article’s headline separately. But it is essential in the search engine. That will show up as the title in your search engine results pages. It acts as the anchor text and the main title in the social shares.

If you are writing the title tag, think of it as your overall content’s primary impression. Make it eye-catching and enticing as much as possible. It affects your site’s click-through rate.

Meta Description

A meta description is essential as the title tag. It is the text where Google crawls in to see if it is worthy of placing into its snippet section. Moreover, it is the summary of your content. That’s why you should not leave it out when editing your content on WordPress or other host websites.

When describing your page or content, avoid fluff or fillers. Make it short and concise, so, Google will understand the essence of your website. The meta description includes what you offer and how people can benefit from purchasing your product or service. If you are writing blogs, present all the values readers can get from your article.

Keywords

Keywords are crucial in ranking your content in search engine results pages. In your meta keywords tag, you will include all the relevant and appropriate keywords to your site.

When you use it according to the rules and practical strategies, you can rank higher.

Furthermore, you might get featured in the Google Snippet. With the right keywords, users or readers can tell what type of content you have.

The Benefits of Meta Tags

Search Engine Crawls Through Content with Meta Tags

Meta tags are crucial to the on-page SEO process. When you optimize them according to experts’ latest techniques, search engines will favor you and might put you at the top of SERPs.

Users Can Find Your Content Without a Problem

Internet users ask questions in Google or other search engines by using relevant keywords. Studying the right keywords for your content will make it easier to get found by readers and potential leads.

It Puts Your Content in Order

With meta tags, you’ll have your meta title, description, and keywords in place. If you leave the meta tags out , you will end up with a gibberish description that will hurt your search engine optimization.

Your Post or Content Will Rank Higher

The search engine bot helps the user find relevant answers through their queries by crawling through the article’s content and meta tags. If you include appropriate and high-ranking keywords with low competition, you’ll get better results. It is best to put the keyword at the beginning of the meta description.

Up until the update of Google’s algorithm, many people abused the use of keywords. However, now Google is considering other factors to boost content’s ranking. Nonetheless, keywords are still a large factor in improving your SEO. If you use them according to their relevance, you might reach new SEO heights and maintain your SERPs ranking.

The Step-By-Step Guide on How to Add Meta Tags to WordPress Website Without Plugin

You’ll find several WordPress plugin options to create meta tags. It is alright to use them, but the disadvantage is the possibility of slowing  down your website and adding irrelevant codes in the theme’s head section.

Create metatags without using plugins to give a cleaner look to your website. Moreover, it provides a sense of fulfillment. The good news is that you can create meta tags without using plugins.

Here is the step-by-step guide:

Step 1

Head to the wp-content/themes folder and browse.

Step 2

Look for the file ‘functions.php’ and open it.

Step 3

Write the following codes to the functions.php file:

function gretathemes_meta_description() {

    global $post;

    if ( is_singular() ) {

        $des_post = strip_tags( $post->post_content );

        $des_post = strip_shortcodes( $post->post_content );

        $des_post = str_replace( array("\n", "\r", "\t"), ' ', $des_post );

        $des_post = mb_substr( $des_post, 0, 300, 'utf8' );

        echo '<meta name="description" content="' . $des_post . '" />' . "\n";

    }

    if ( is_home() ) {

        echo '<meta name="description" content="' . get_bloginfo( "description" ) . '" />' . "\n";

    }

    if ( is_category() ) {

        $des_cat = strip_tags(category_description());

        echo '<meta name="description" content="' . $des_cat . '" />' . "\n";

    }

}

add_action( 'wp_head', 'gretathemes_meta_description');

Step 4

Update and save the changes.

If you want to add a meta keyword tag to your content, you can go to the function.php file and write the codes below. Keep in mind that search engines do not usually use the meta keyword tag, but the decision is up to you.

function gretathemes_meta_tags() {

    echo '<meta name="meta_name" content="meta_value" />';

}

add_action('wp_head', 'gretathemes_meta_tags');

Add the code before the php ?> closing tags. If you are using a new theme for your website, repeat the same process as mentioned above.

Ending thoughts on how to add meta tags in WordPress without plugin

Now that you have learned the necessary code on how to add meta tags in WordPress without a plugin, you can begin creating your meta tags on your own.

When you have meta tags on your website, it will help the search engine crawlers to find your metadata information. In return, your website will become SEO-friendly, making it available to different types of people online.

Ensure that your meta tags are clear and understandable to make it easier for crawlers to find your content. Eventually, it affects how your content or website will look like on SERPs. Finally, you don’t need to go through different plugins to create your meta tags. By following these steps, you are taking the right path for your website’s success.

If you enjoyed reading this article on how to add meta tags in WordPress without a plugin, you should check out this one about how to uninstall WordPress from cPanel.

We also wrote about a few related subjects like how to tell if a site is WordPress, how to hide a featured image in a WordPress post, how to embed excel in html, how to embed a pdf in WordPress, how to optimize CSS delivery in WordPress and how to create a website like Amazon.


Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /var/www/wpdatatables.com/wp-content/themes/tabor/components/post/content.php on line 60
Up Next:

How to Scan The WordPress Database For Malware

How to Scan The WordPress Database For Malware