How to add keywords in wordpress

New Page

How to add keywords and meta descriptions in WordPress

Last Updated On Jan 6, 2021 By Editorial Team | Reader Disclosure Disclosure : Our content is endorsed by the reader. This means that if you click on some of our links, we may earn a commission. See how WPBeginner is funded, why it’s important, and how you can support us.

Share 834 Fee Tweet Fee Facebook Messenger WhatsApp Email

Do you want to correctly add keywords and meta descriptions in WordPress?

Meta keywords and descriptions allow you to improve the SEO ranking of your website. This means more traffic, leads, and sales for your business.

Dans cet article, we will show you how to easily add keywords and meta descriptions in WordPress.

Add meta keywords and meta descriptions on WordPress Adding Meta Keywords and Meta Descriptions in WordPress

Why add keywords and meta descriptions in WordPress?

Keywords and descriptions allow you to inform search engines about the content of your posts and pages.

Las palabras clave son palabras o important frases que es probable que las personas busquen para encontrar su contenido. A meta description is a brief description of the page you are dealing with or the post.

It is your meta title, description and keywords that appear in Google search results:

Google search listing Google search list

The meta and description meta keywords are HTML meta tags. They are part of the header code of your website. They do not appear on your page or post for visitors to see. Sans however, search engines and browsers can use them.

WordPress SEO plugins make it easy to add them from your WordPress admin area to every post and page on your website.

What do meta keywords and meta descriptions matter for SEO?

Like most WordPress users, you are probably wondering if adding meta keywords and meta descriptions will improve my WordPress SEO ranking.

While search engines don’t share exactly how much weight they assign to keywords or description, SEO experts always recommend adding a proper meta description and keywords for on-page SEO optimization.

Meta descriptions are widely used by search engines. In Google search results, they appear below your content title, with the search term in bold.

A sample meta description, for the All in One SEO add-in homepage An example of a meta description, for the home page of the All in One SEO plugin

Una meta descripción efectiva alentará a los usuarios a hacer clic y leer su contenido. Y lo que sí sabemos es que una buena tasa de clics significa que Google probablemente clasificará su contenido más alto.

Now when it comes to meta keywords, most modern search engines either assign very little importance or don’t use them at all. The main exception is the Russian search engine Yandex.

Instead search engines prefer that you add your focused keywords in your title, description, and through out your content. This is why SEO plugins like AIOSEO comes with a TruSEO score that helps you optimize your content for focused keywords and keyphrases.

Our Recommendations for Meta Keywords and Meta Descriptions

We recommend adding a meta description for all the posts and pages on your site, including your homepage, category pages, and tag pages.

Note: Google customizes the description based on the search query, so it will only use your meta description some of the time. However, it’s still worth creating a meta description. It will appear for around 30% of users, and it can help your SEO.

When it comes to meta keywords, it’s up to you whether or not to use them. They will not harm your site, but they may not have much benefit either.

Having said that, let’s take a look at how to easily add keywords and meta descriptions in WordPress.

How to Add Meta Description and Keywords in WordPress (Video Tutorial)

Subscribe to WPBeginner

If you prefer the written tutorial, then please continue reading.

Installing and Activating All in One SEO for WordPress

For this tutorial, we will be using All in One SEO (AIOSEO) which is the best WordPress SEO plugin on the market. It allows you to easily optimize your entire WordPress site for better SEO and comes with comprehensive set of tools to grow your business.

First, you’ll need to install and activate the All in One SEO plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, All in One SEO will take you through a simple setup wizard. Just follow the step by step instructions to get everything set up for your site.

After completing the setup, simply click the ‘Finish Setup and Go to the Dashboard’ button.

Click the Finish Setup button to go to your dashboard Click the Finish Setup button to go to your dashboard

Enable Meta Keywords Support in All in One SEO

All in One SEO comes with built-in support for meta description and keywords. However, the meta keywords feature is turned off by default. This is because many search engines give little or no importance to keywords in their rankings.

To enable it, go to All in One SEO » Search Appearance » Advanced in your WordPress dashboard. Then, switch the meta keywords toggle from No to Yes.

Activate the option of meta keywords in All in One SEO Turning on the meta keywords option in All in One SEO

After enabling meta keywords in WordPress, you will see some additional options. You can generate a post’s keywords from its categories and/or tags. Also, you can dynamically generate keywords on your blog posts and archive pages.

It’s up to you whether you want to use these automated options or not. Regardless, you will always be able manually define keywords for each post and page.

The meta keyword options that are available in All in One SEO The meta keyword options that are available in All in One SEO

Don’t forget to click the ‘Save Changes’ button at the bottom of the page after making changes.

Adding Meta Descriptions and Meta Keywords to Your WordPress Posts and Pages

First, you need to edit a post or page where you want to add your meta keywords and meta description.

AIOSEO works on both WordPress block editor (Gutenberg) and WordPress classic editor.

Once on the content editor screen, scroll down to the ‘AIOSEO Settings’ box below the content area.

Adding a Meta Description to Your Post or Page Using AIOSEO

You will see your site’s title and an automatically generated description as the snippet. Below that, you’ll see the Meta Description field.

The automatically generated snippet in All in One SEO The automatically generated snippet in All in One SEO

Go ahead and enter a description into your Meta Description field. All in One SEO will let you know how many characters you’ve used. This is important because Google will only show 160 characters in the search results.

You’ll see that your snippet preview automatically updates as you type your meta description.

Entering your meta description in All in One SEO Entering your meta description in All in One SEO

Once you’ve finished, simply save or publish your post to save the changes to your meta description.

Using All in One SEO’s Dynamic Tags in Your Meta Descriptions

Optionally, you can add tags to your meta description. The ones that All in One SEO offers by default are Page Content and Separator, but you can add other dynamic tags as well.

For example, we’ve added the author’s name to our meta description here.

A meta description with the tags Author First Name and Author Last Name at the start A meta description with the tags Author First Name and Author Last Name at the start

To add a tag, simply type the # character into the meta description box. You’ll then see a dropdown menu of available tags.

Adding tags to your meta description in All in One SEO Adding tags to your meta description in All in One SEO

Adding Meta Keywords to Your Post or Page Using AIOSEO

To add your meta keywords, you need to click the Advanced tab for your AIOSEO settings.

Simply type in your keywords, and press Enter after each one. It’s important to only use keywords that are relevant to your content. Adding irrelevant keywords will not give you any SEO benefits.

Adding meta keywords for your post or page using All in One SEO Adding meta keywords for your post or page using All in One SEO

Tip: Meta keywords are completely separate from your Focus Keyword. You can set a Focus Keyword under the General tab. This is for All in One SEO to give you recommendations about improving your content. The Focus Keyword doesn’t automatically become a meta keyword for your post or page.

Adding Meta Keywords and Meta Description for Your Homepage

You can also add meta keywords and a meta description for your website’s homepage in WordPress. Here is how to do that using All in One SEO.

First, go to Search Appearance » Global Settings in your WordPress admin. Then, scroll down to the Home Page section.

The Home Page section in your Search Appearance settings for All in One SEO The Home Page section in your Search Appearance settings for All in One SEO

On this screen, you can easily enter a meta description and keywords, just like you would for a post or page.

All in One SEO will use your tagline as your meta description by default. You can leave that in there or you can customize it.

Entering a meta description and keywords for your homepage Entering a meta description and keywords for your homepage

You can also click on the other options to add those tags into your meta description. Alternatively, you can add different tags by typing the # character in your meta description, as described above.

Tip: It’s better to use these tags rather than manually typing your site title, tagline, or separator character. This is because your meta description will automatically be updated if you later make changes to any of those.

Make sure you click the Save Changes button at the bottom of the page after adding your meta description and keywords.

Meta Keywords and Description for WordPress Category Archives

You can also add keywords and description to your category and tag archive pages.

First, you need to visit the Posts » Categories page. Take your mouse over to the category you want to edit and then click on the ‘Edit’ link.

Editing a category in WordPress Editing a category in WordPress

Scroll down on the category’s page to the AIOSEO Settings box. Here, you just need to enter a meta description for your category. Again, you can use All in One SEO’s tags within this if you want to.

Ajouter une méta description pour votre catégorie dans All in One SEO Ajouter une méta description pour votre catégorie dans All in One SEO

To add keywords, simply click on the Advanced tab like you would for any post or page.

Make sure you save the changes to your category before moving on.

Your meta description and keywords will now be used for the category page, which is the archive of posts in that category.

You can repeat the process to add meta keywords and descriptions to your blog’s tags and other custom taxonomy archive pages.

All in One SEO integrates seamlessly with other popular WordPress plugins. This allows you to add keywords and meta description for your WooCommerce product pages, SeedProd landing pages, MemberPress course pages, and more.

We hope this article helped you learn how to easily add keywords and meta description to your WordPress posts and pages. You may also want to see our step by step guide on how to create an email newsletter to grow your website traffic, and our comparison of the best WordPress contact form plugins.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Comparte 834 Cuota Pío Cuota Facebook Messenger WhatsApp Correo electrónico

How to Add Keywords In WordPress Without Plugins

15 de abril de 2022January 7, 2022 by Stephen Hockman

If you’re one of the millions of website owners who want to know how to add keywords in WordPress without plugins, then this technical guide is for you.

What you’ll find below is a complete answer with step-by-step instructions to the question, “how do I manually add keywords to WordPress?”.

By the end of this guide, you’ll know how to create and insert keywords into custom meta tags and images so you can work to improve your website’s search engine optimization (SEO).

For some odd reason, the WordPress content management system (CMS) doesn’t have built-in support for adding SEO keywords to certain HTML fields that are important to search engine optimization, which is why so many third-party plugins have been developed for this purpose.

However, you don’t need to install another WordPress plugin to enable a keyword optimization feature as you’ll soon find out in this instructional guide below. (See my guide on how to change the SEO title in WordPress if you do want to use a plugin.)

NOTE: This guide will teach you two methods for adding keywords to your WordPress site. The first method will make the process automatic for each post or page and the second method will allow you to manually insert keywords into each post or page. So choose the solution that works best for your website needs.

Cómo agregar palabras clave dans WordPress sin complementos

Table of Contents

  • How to Add Keywords In WordPress Without Plugins
    • 1. Open the WordPress Themes Folder
    • 2. Find and Open the functions.php File
    • 3. Add The Following Code to the functions.php File
    • 4. Save the functions.php File
    • 5. Refresh the WordPress Site
  • How Do I Manually Add Keywords In WordPress?
    • 1. Create A New Post or Open an Existing Post
    • 2. Turn On the Custom Fields Option
    • 3. Create A Custom Field for Meta Keywords
    • 4. Create A Custom Field for Meta Description
    • 5. Open the WordPress Theme’s functions.php File
    • 6. Add A Function to Call Each Custom Field
    • 7. Save the functions.php File
    • 8. Reload the WordPress Page
  • How Do I Add Keywords to an Image In WordPress?
  • Other Ways to Add Keywords to WordPress
  • Adding Keywords In WordPress Without Plugins Summary

How to Add Keywords In WordPress Without Plugins

1. Open the WordPress Themes Folder

The first step for how to add keywords in WordPress without plugins can be done in two ways:

  • Using the WordPress Dashboard: Go to Appearance > Theme Editor
  • Using the File On the Web Server: Go to wp-content/themes folder and browse through the folder to find the theme currently being used. Then open that folder to display the list of files.

2. Find and Open the functions.php File

Inside the WordPress dashboard Theme Editor or on the web server, find and open the functions.php file.

According to WordPress.org, “The functions.php file is where you add unique features to your WordPress theme. It can be used to hook into the core functions of WordPress to make your theme more modular, extensible, and functional.”

Basically, functions.php file is a template included in all WordPress themes. And it works like a plugin for your WordPress website that’s automatically activated with your current theme.

In this case, you’ll be using the functions.php file to add keywords to a WordPress site without using a plugin from a third-party developer.

3. Add The Following Code to the functions.php File

After you open the functions.php, the next step is to add PHP code that performs the task of creating the proper HTML meta tags for your WordPress site:

  • Meta description tag
  • Meta keywords tag

Pour ce faire, copiez le code PHP de la zone ci-dessous et collez-le à la fin du fichier functions.php. 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, 160 ); $keywords = get_the_category( $post->ID ); $metakekeywords = ”; 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’, ‘

This Is How the Above PHP Code Works:

  • It makes the process of adding keywords to your pages and posts automatic.
  • It does is fetches the starting 160 characters from the first paragraph of any post and page and displays it as the meta description.
  • It fetches the post or page category and displays it as the meta keywords.

Therefore, you’ll want to make sure that your most important keywords are within the first 160 characters of your content. Otherwise, those keywords will not be shown in the meta description HTML tag in Google’s search engine results pages (SERPs).

As for the meta keywords, using this process will not allow you to add more than one keyword into this HTML field. To get two or more keywords listed, check out the next section of this guide on “How Do I Manually Add Keywords to WordPress”. It will teach you how to do this with custom fields for each post and page.

But just know that meta keywords are not that important for SEO anymore, so you don’t have to worry about adding more than one keyword into this HTML field. See my post on what are meta keywords in SEO for more details on this topic.

4. Save the functions.php File

After you’ve pasted the correct PHP code into the functions.php file, you’re done with this WordPress customization.

All you have to do now is save the functions.php file for the updates to be stored in the WordPress database.

5. Refresh the WordPress Site

The final step to adding keywords to WordPress without plugins is to check your work and see the changes taking place on the live website.

To do that, go to a web page and then refresh it to clear the cache.

Then check the HTML source code using the keyboard command ctrl + u on most web browsers to find the meta description and meta keywords being displayed in the <head> section of the web page.

NOTE: If you want more manual control over your keywords in WordPress for the meta tags, then the next section can help. It will show you how to use the custom fields feature in WordPress to manually add custom meta descriptions and meta keywords into any page or post on the website. If you want to learn how to use keywords in an article for SEO, I have a separate step-by-step guide for that topic.

¿Cómo agrego manualmente palabras clave en WordPress?

How Do I Manually Add Keywords In WordPress?

1. Create A New Post or Open an Existing Post

Login to your WordPress dashboard, then create a new post or open an existing post to which you want to add a meta description or meta keywords tag.

2. Turn On the Custom Fields Option

According to WordPress.org, “WordPress has the ability to allow post authors to assign custom fields to a post. This arbitrary extra information is known as metadata.” And it’s the perfect solution for adding keywords to a WordPress site without using plugins.

However, the WordPress custom fields option will not be turned on by default. So you need to fix this to add your keywords to the correct meta tag fields.

Here’s the list of steps for turning on the custom fields feature:

  • At the top right of your WordPress dashboard, you should see three dots. Click on those dots to open the WordPress options menu.
  • In the pop-up screen for Preferences, click on the “Panel” tab located on the left-hand side.
  • Under the “Additional” section, click on the “Custom Fields” toggle bar to toggle it to the on position. A page reload is required for this change. Make sure your content is saved before reloading. Then, click on the “Enable and Reload” button that appears.
  • After the page reloads, a “Custom Fields” section will appear below your WordPress text editor.

Here’s an image showing the “Custom Fields” section in the Preferences pop-up box:

Pon tus palabras clave en este cuadro

3. Create A Custom Field for Meta Keywords

Scroll down past the bottom of the WordPress text editor to the new “Custom Fields” section that was enabled in the previous step of this guide.

You should now see an “Add New Custom Field” box.

Here’s how to create the custom field for meta keywords:

Téléchargez la feuille de triche de recherche de mots clés SEOTéléchargez la feuille de triche de recherche de mots clés SEO

Where can I send your FREE SEO Cheatsheet?

Join my list and get a FREE cheat sheet with 24 SEO keyword search strings as a welcome gift!

Send me the cheat sheet!

100% confidentiality. Unsubscribe at any time.

  • Under the “Name” column, click on “Enter new” which is under the “- Select -” drop-down menu.
  • In the text field that now appears under the “Name” column, type “keywords”. This will assign a custom field for meta keywords.
  • In the text field under the “Value” column, enter the keywords you want to display in the HTML meta keywords tag with commas separating each phrase.
  • Click the “Add Custom Field” button to save this new custom field for meta keywords.

Here is an image showing the main “Custom Fields” section in WordPress:

Section des champs personnalisés WordPress

Here is an image showing the process of adding data to the “Name” and “Value” fields of meta keywords:

Ajouter un champ personnalisé de mots-clés WordPress

4. Create a custom field for the meta description

You will repeat the same process shown in step 5 to create the meta description information.

Cependant, cette fois, vous mettrez le mot « description » dans la colonne « Nom » et vos informations de méta-description personnalisées dans la colonne « Valeur ».

Une fois que vous avez terminé cette tâche, cliquez sur le bouton “Ajouter un champ personnalisé” pour enregistrer ce nouveau champ personnalisé pour la méta description.

Voici une image montrant le processus d’ajout de données dans les champs “Nom” et “Valeur” de la méta description :

Ajouter un champ personnalisé de description WordPress

5. Ouvrez le fichier functions.php du thème WordPress

The next step for manually adding keywords in WordPress is to create a function that calls the custom fields you created in the previous two steps and outputs the metadata in the <head> section of the website.

To do this, you first need to open the theme’s functions.php file.

This can be done in one of two ways:

  • Using the WordPress Dashboard: Go to Appearance > Theme Editor > functions.php
  • Using the File On the Web Server: Go to wp-content/themes folder and browse through the folder to find the theme currently being used. Then open that folder and edit the functions.php file.

6. Add A Function to Call Each Custom Field

After you’ve opened the WordPress theme’s your theme’s functions.php file, add the following two PHP code blocks to it:

Meta Description PHP Code

/*Display custom meta description or post snippet */ function add_custom_meta_des(){ #Front page meta description if( is_home() || is_front_page() ){ $meta_des = “Enter meta description here of your homepage”; #Edit here echo ‘<meta name=”description” content=”‘. $meta_des. ‘” />’; } #Meta description of a single page if( is_single() ){ $des = get_post_meta( get_the_id(), ‘description’, true); if( ! empty( $des ) ){ $meta_des = esc_html($des); echo ‘<meta name=”description” content=”‘.$meta_des.'” />’; } }} add_action( ‘wp_head’, ‘add_custom_meta_des’, 4 );

Meta Keywords PHP code

/*Display custom meta keywords or post snippet */ function add_custom_meta_key(){ #Front page meta description if( is_home() || is_front_page() ){ $meta_key = “Enter here the meta-keywords of your homepage by separating each sentence with a comma”; #Edit here echo ‘<meta name=”keywords” content=”‘. $meta_key. ‘” />’; } #Meta description of a single page if( is_single() ){ $key = get_post_meta( get_the_id(), ‘keywords’, true); if( ! empty( $key ) ){ $meta_key = esc_html($key); echo ‘<meta name=”keywords” content=”‘.$meta_key.'” />’; } }} add_action( ‘wp_head’, ‘add_custom_meta_key’, 4 );

Here is how the above PHP codes work:

  • The first line of the code in each example checks if the current page is the homepage, and if it is true, then the custom meta keywords or meta description entered in the code will be displayed in the HTML output.
  • If the current page is not the homepage, the code checks if the page is a single post page, and if it is true, then it checks if the page has a custom field named “keywords” or “description” and outputs the custom field data if present. If not present, it outputs nothing.

7. Save the functions.php File

After you’ve pasted the above PHP code blocks into the functions.php file, you’re done with this WordPress customization.

All you have to do now is save the functions.php file for the updates to be stored in the WordPress database.

8. Reload the WordPress Page

The final step to manually adding keywords in WordPress without plugins is to check your work and see the changes taking place on the live web page.

Essayez Ezoïque

To do that, go to the web page you entered created the custom fields for, and then refresh it to clear the cache.

Next, check the HTML source code using the keyboard command ctrl + u on most web browsers to find the meta description and meta keywords being displayed in the <head> section of the web page.

How Do I Add Keywords to an Image In WordPress?

To add keywords to an image in WordPress you need to click on the image in the post to bring up the block editor. Next, add the keywords in the ALT text box. This alternative text will be scanned by search engine crawlers to identify WordPress image keywords.

How to Add Keywords to an Image in WordPress Using the ALT Text Box

One thing to keep in mind here is that the ALT text field is also used by screen readers to help people with disabilities understand the content within the image. Therefore, you should not just use the image ALT text box to stuff your keywords in WordPress.

Instead, use this HTML field to properly describe the image while also including your main target keywords naturally in the text.

Other Ways to Add Keywords to WordPress

Adding keywords to the meta tags and image ALT text are not the only ways you can optimize a WordPress website for SEO.

There are also a number of other places you can put keywords on each web page that don’t require plugins.

In fact, you can just insert keywords on the page using plain text to improve the on-page SEO for the content in the following areas:

  • Page title (also known as the meta title)
  • Headings (H1 to H6)
  • Body content
  • Internal link anchor text

You can also take it a step further by optimizing these placements for keywords:

  • Page name URL
  • Image file names
  • Image metadata
  • Navigation menu text
  • HTML title attributes

See my guide to what is on-page SEO for more details on optimizing these placements for search engines like Google, Yahoo, and Bing.

Additionally, some people also ask “do WordPress tags help SEO?” which is a common topic I cover in depth for WordPress site owners.

Adding Keywords in WordPress Without Plugins Summary I hope you enjoyed this guide on how to add keywords in WordPress without plugins.

As you have discovered, there are two methods to solve the question of how to manually add keywords to WordPress for META tags.

The first option is to automatically pull keyword data from WordPress post content and category data. And the second is to create custom fields that allow you to write custom meta tags for each web page to optimize it in the most effective way for SEO purposes.

As for adding keywords to images, this can simply be done with the block editor in the WordPress post as well as adding those target phrases in the content itself with plain text.

Download the SEO keyword research cheat sheet

Where can I send your FREE SEO Cheatsheet?

Join my list and get a FREE cheat sheet with 24 SEO keyword search strings as a welcome gift!

Send me the cheat sheet!

100% confidentiality. Unsubscribe at any time.

gravatar

Stephen Hockmann

Stephen Hockman is an entrepreneur and founder of SEO Chatter. He specializes in search engine optimization and digital marketing and has been fascinated with SEO since 2005. Stephen’s goal is to share the best search engine marketing tips and news so you can get more traffic for your website.

Categories Tags Post navigation

How to find the most searched keywords in Google

How to put keywords in an article to use for SEO

Google Google translator

Google Google Translate


Video How to add keywords in wordpress

Related Posts

How to add seo keywords in wordpress

Contents1 Cómo agregar palabras clave de SEO en WordPress (aumentar el CTR y las clasificaciones)1.1 Post Title1.2 Headline1.3 Header Tags1.4 Introduction and Conclusion1.5 Body Copy1.6 URL1.7 Meta…

How to embed google calendar into wordpress

Contents1 How to Add a Google Calendar in WordPress (Step by Step)2 Add a Google calendar to your website3 calendario de Google3.1 Versatile plans and pricing4 Video…

How to change the logo in wordpress

Contents1 How to Add a Custom Logo to Your Site Header2 Site Logo2.1 Planes y precios versátiles3 Add, remove or edit a custom logo4 Video How to…

How to add a popup on wordpress

Contents1 Easily create a WordPress emergent form (2 forms)1.1 ¿Por qué usar un formulario emergente de WordPress?1.2 Método #1: Crear un formulario emergente con OptinMonster + WPForms1.3…

How to roll back wordpress version

Contents1 How to Revert WordPress: Undo WordPress Updates (Easy Way)2 How to Downgrade WordPress & Roll Back to a Previous Version2.1 1. A WordPress update included significant changes…

How to rollback wordpress version

Contents1 How to Downgrade WordPress and Revert to an Older Version1.1 1. A WordPress update included significant changes that are not compatible with your theme or plugins1.2…