How to Add Keywords in WordPress Without Plugins Easily

How to Add Keywords in WordPress Without Plugins

3 minutes read

Tutorials

This is the right place for the visitors who are wandering around searching for some of the easiest ways to learn How to add Keywords in WordPress Without Plugins.

Optimizing keywords is one of SEO’s most important things. Practically, when a person looks for the topic, it’s more likely to use keywords on a website. This article is all about teaching you to add Keywords in WordPress Without Plugins.

What is Keyword?

Keywords are words and sentences that are so essential to your blog that your connection shows when people follow those keywords. The search ranking can be considerably intensified with acceptable keywords. A short excerpt is a meta description of a website or blog.

Any search engine uses a standard algorithm to determine which pages are shown. Any modern search engine uses similar keyword values but maintains that the search engine’s keywords relevance varies. But it is also a good idea to track the keywords on your web content.

How to add Keywords in WordPress Without Plugins?

You might want to value meta keywords. In either way, you can add the necessary WordPress meta attributes without using plugins. To do this, take these few moves.

Edit header.php file

You’re not always required to use SEO Plugin. Occasionally you can just swap specific codes.

Here are some of the easiest steps you need to follow:

  • Go to WordPress Dashboard
  • Now, just go to Appearances >> Editor >> header.php
How to add Keywords in WordPress Without Plugins
  • Locate the code below inside the header.php
<title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title>

You can divide this script into a more straightforward form and make it a function called Your name. However, editing would be the best solution.

You need to add the next codes for meta tag keywords and site description. Add this Search Engine Snippet code:

<meta name=”description” content=”your description here” />

In the case of keywords:

<meta name=”keywords” content=”your keywords here” />

Now change the content tag with the description and keywords for passages you want to make. Try to keep the snippet between 130-150 since Google actually produces as much as feasible.

Adding meta description and keywords

However, we recommend that you stop this and use a plugin. Since SEO is only supported by a dedicated plugin. Yoast’s WordPress SEO is an excellent SEO plugin.

Here is the code to include the meta and keywords in your header. Paste it into the functions.php file of style.

function add_meta_tags() {
global $post;
if ( is_single() ) {
$meta = strip_tags( $post->post_content );
$meta = strip_shortcodes( $post->post_content );
$meta = str_replace( array("\n", "\r", "\t"), ' ', $meta );
$meta = substr( $meta, 0, 125 );
$keywords = get_the_category( $post->ID );
$metakeywords = '';
foreach ( $keywords as $keyword ) {
$metakeywords .= $keyword->cat_name . ", ";
}
echo '
<meta name="description" content="' . $meta . '" />' . "\n";
echo '
<meta name="keywords" content="' . $metakeywords . '" />' . "\n";
}
}
add_action( 'wp_head', 'add_meta_tags' , 2 );

Video tutorial

Sum Up

Hope you now have a rough idea about How to add Keywords in WordPress Without Plugins. Do leave us a comment. You should also check our article on How to Change Your Password in WordPress Easily.

If you enjoyed this post, subscribe to our WordPress video tutorials on YouTube Channel. Remember to follow us on Pinterest.

If you have any suggestions or questions, do leave us a comment.

What do you think?

Leave a Reply

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

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Related Articles

Menu