How to add meta tags to wordpress

New Page

How to Add Meta Tags in WordPress

Anna Fitzgerald

Anna Fitzgerald

I updated: May 10, 2022

Publication : June 29, 2020

When crawling your website, search engines intend to collect as much information as possible. Other titles, headings, body text, URLs and other SEO elements on the page, search engine and other posters for front-end users. This data is known as meta tags.


According to Google, meta tags are another way site owners can tell search engines about their sites. These tags can contain the meta description, author, document type, language, copyright, and any other relevant information about the site. It’s important to note that keyword meta tags haven’t been a ranking factor since 2009 so you don’t have to worry about them. Just focus on adding keywords to optimize your elements on the page.

Because the default installation of WordPress does not contain meta tag data, site owners must add this data themselves. You can do this manually by adding meta tags in your theme’s template files or by using WordPress plugins. Let’s look at each method below.

Download maintenant : How to launch a WordPress website [Free Guide + Checklist]

How to Add Meta Tags in WordPress Manually

Manually adding meta tags in WordPress is relatively simple. For this demonstration, use the WordPress Codex example. Imagine that this is Harriet Smith, a veterinarian who blogs about her animal stories on WordPress. You want to add the following generic meta tags to her site:

<meta name=”resource-type” content=”document” /> <meta http-equiv=”content-type” content=”text/html; charset=US-ASCII” /> <meta http-equiv=”content -language” content=”en-us” /> <meta name=”author” content=”Harriet Smith” /> <meta name=”contact” content=”[email protected]” /> <meta name=” copyright” content=”Copyright (c)1997-2004 Harriet Smith. All rights reserved.” /> <meta name=”description” content=”Histoires et contes spéciaux sur les chiens, les chats, les oiseaux, les furets et d’autres animaux domestiques racontés” by Harriet Smith, veterinarian. Les histoires incluent des histoires de brave et de courage d’animaux, de vie et de mort, camaraderie,

To do so, follow this step-by-step guide.

1. Login to your hosting account control panel and open File Manager .

2. Click on the public_html folder on the left side of your screen.

Blue graphic prompting the user to click on the folder with the tag public_html

Source of image

3. Click on the tapis wp-content .

4. Search the dossier entitled “thèmes”.

Blue graphic directing the user to click on the theme folder

Source of images

5. Cliquez sur le dossier portant le nom de votre thème.

6. Click on the right button on the header.php model and select Modifier on the menu.

7. Add the balises meta dans la section head (between the balise <head></head>.

8. Enregistrez vos modifications.

Blue graphic prompting the user to save changes

Source des images

While manually adding meta tags is a relatively simple process, it only works if you have a clear purpose for your website like Harriet. In that case, you can use basic information to create generic meta tags and place these in your header.

If your site covers a wider range of topics, then you’ll need to set unique meta tags for each post and page. You can do so using a plugin.

How to Add Meta Tags in WordPress Using a Plugin

With a plugin, you can add generic and unique meta tags to your WordPress site. We’ll walk through how to add them using the Meta Tag Manager plugin. If you’re using another plugin, check out its documentation for exact steps.

1. First, log into your WordPress dashboard.

2. Click Plugins > Add New.

Haga clic en Complementos> Agregar nuevo en el panel de WordPress para iniciar el proceso de instalación del complemento

3. Search for “Meta Tag Manager.” When the search result appears, click Install Now and Activate.

Descarga e instalación del complemento Meta Tag Manager

4. You’ll be automatically redirected to the tab containing all installed plugins on your site. At the top of the screen, you should see a message confirming the plugin has been activated.

Mensaje de éxito "El complemento está activado"

5. Navigate to Settings > Meta Tag Manager.

Haga clic en Configuración > Administrador de metaetiquetas para comenzar a agregar metaetiquetas.

6. Now you can begin creating global meta tags and assigning them to different areas on your site. Let’s say you want to add an author meta tag for all posts on my site. You’d configure the settings as shown below.

Crear metaetiqueta de nombre de autor para todas las publicaciones en WordPress

7. Then, switch over to the General Options page and make sure that posts, pages, and media are listed in the field labelled “Post Type Support.” That way, when editing a post, page, or media file, you can add meta tags that will only be displayed on that specific item.

Configuración del soporte de tipo de publicación en el complemento Meta Tag Manager para WordPress

8. When editing in this way, the Meta Tag Manager will appear as an individual meta box, as shown below.

Cuadro meta del administrador de etiquetas meta

In the demo below, you’ll see that I’m in the post editor. I scroll past the Yoast SEO meta box to the Meta Tag Manager meta box and add a meta description tag that’s unique to this specific post.

Creación de metaetiquetas en una publicación de demostración individual

Following the same process, you can add unique meta tags to all your posts and pages.

Adding Meta Information to Your Site

To provide search engines with as much information about your WordPress website as possible, you can add generic meta tags in your theme’s header. Or you can use a meta tag plugin to create and manage global meta tags as well as custom meta tags for your individual posts and pages. Pick the method that works best for you and your site.

palabra clave

Topics: WordPress Website

¡No olvides compartir esta publicación!

How to add meta tags to WordPress website without plugins Cómo agregar metaetiquetas al sitio web de WordPress sin complementos

How to Add Meta Tags to WordPress Without Plugins

Última actualización: 21 de septiembre de 2020 en Optimización

Meta tags are one of the most important things in SEO. Having and set it in the right content following SEO instruction will help you to have a better ranking on search result pages.

Today, we would like to share with you some information about meta tags and how to add meta tags to your WordPress website without plugins.

¿Qué son las metaetiquetas?

The META balises provide concise information on a website or a publication on the search engines. Il sera affiché sur les pages de résultats de recherche.

Meta Description Metadescripción

Beacons of meta-description

Ils répertorient des informations sur la pagina Web ou la publication, telles que l’auteur, les mots clés, la description, le type de document, les droits d’auteur et d’other essential informations that you judge pertinent for your page. More the balise meta the most important is the balise meta description.

Here is an example of balise meta description:

<meta name=”description” content=”Ceci est la phrase de description ou un court paragraphe sur l’article ou la publication.” />

Comme auparavant, la balise meta description avait été affichée avec moins de 150 caractères par Google, mais maintenant c’est 300 caractères. Ainsi, vous aurez plus d’espace pour ajouter du contenu à celui-là.

¿Por qué son necesarias las etiquetas meta?

They are important and almost must be included in the on-page SEO process. The better you optimize it, the higher the appreciation of your website by search engines.

The search bots will search for necessary information for users based on the meta tags’ and the article’s content. The page or post will rank higher in search result pages if its meta tags contain important keywords. Therefore, it should be concise and contain important keywords. It will be better for SEO if you can put the keyword to the beginner of the description is better.

Moreover, it will appear on the search result pages, so you should optimize it well and use call-to-action words in its context.

Cómo agregar metaetiquetas al sitio web de WordPress sin complementos

There are various WordPress plugins which can create meta tags for page or post well. However, it may cause your WordPress website to be slow loading because of using too many plugins on the site.

On the other hand, adding it can be done without a plugin by following simple steps below.

Step 1: Go to wp-content/themes folder, and browse the theme folder which currently being used.

Step 2: Find and open the file named functions.php.

Step 3: Add the following code 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” ;

Étape 4 : Mettez à jour le fichier functions.php dans votre thème en l’enregistrant.

If you sometimes kiss a balise meta keyword, add the code you want to your functions.php file. Please note that the balise meta keyword is obsolete and is not widely used by search engines. Alors utilisez-le avec votre considération.

function gretathemes_meta_tags() { echo ‘<meta name=”meta_name” content=”meta_value” />’ ; } add_action(‘wp_head’, ‘gretathemes_meta_tags’);

You may have noticed that the links of code do i-dessus doivent être ajoutées avant de fermer les balises de php ?>

Plus, if you want to choose a new theme, you may want to repeat the memes in functions.php in your new theme.

Vous avez donc terminé d’ajouter des balises méta à votre site Web WordPress sans plugins.

As you see, the process involves with custom coding a little bit. So, you might want to learn more about coding. It’s very interesting. Here is a list of some free places you can start with.

Sin embargo, si la codificación no es su punto fuerte, entonces un complemento de SEO aún ayuda. Recomendamos encarecidamente Slim SEO , un complemento de SEO ligero y automatizado para WordPress. Solo necesitas instalarlo y activarlo . No hay configuración ni opciones. Todo se hace automáticamente. Para obtener información sobre cómo optimizar su sitio de WordPress con Slim SEO, consulte este artículo .

Slim SEO – Fast & Automated WordPress SEO Plugin Slim SEO - Fast and automated WordPress SEO pluginSlim SEO – Complemento de SEO de WordPress rápido y automatizado

Autor(es): eLightUp

Versión actual: 3.15.2

Última actualización: 22 de septiembre de 2022

92% Ratings 20,000+ Installs WP 4.5+ Required

Hopefully this article will help you improve your site. Good luck !

Comparer est:

  • Click to share on Facebook (S’ouvrir in a new window)
  • Click to share on Twitter (S’ouvrir in a new window)
  • Click to compare on LinkedIn (Opens in a new window)
  • Click to share on Reddit (S’ouvrir in a new window)

you might also like

I optimized my website with Slim SEO

I optimized my website with the addition of Slim SEO (simply to get a higher SEO score)

Present Slim SEO, how to use it to optimize your WordPress website automatically, change settings, hide its functions and compare with Yoast SEO.

How to fix Facebook post display using Facebook debugger

How to fix Facebook post display using Facebook debugger

Use the Facebook debugger to find out where the error is, and then fix the Facebook post display in seconds without coding. Step by step guide here.

Learn more about how Yoast SEO to optimize your WordPress website

Comment to use Yoast SEO to optimize the WordPress website – P2 – General Configuration

In this article, I will introduce some general settings about displaying content on search engines and social networks to optimize your website.

Laissez un commentaire Cancel la réponse

Google Google Translate

Video How to add meta tags to 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…