Как изменить мета описание wordpress

Мета теги WordPress — как настроить название страницы, описание и ключевые слова? Настройка Title, Description, Keywords в WordPress. Плагин All in One Seo
Создание мета тегов

Мета теги WordPress, для чего вообще нам нужны эти теги? В первую очередь для оптимизации, для того что бы поисковые системы нас понимали, понимали то о чем данная страница. От настроек Title, Description, Keywords зависит как нас будут индексировать и будут ли индексировать вообще.

Если говорить о важности настроек мета тегов, то они стоят на первом месте любой оптимизации абсолютно любого сайта в интернете. Сразу же после установки WordPress на локальный компьютер или хостинг, стоит задуматься о WordPress мета тегах, что бы потом не пришлось все переделывать по несколько раз.

Что же давайте разберем для чего нужны Title, Description, Keywords и как их можно легко настроить с помощью плагина WordPress.

Перед тем как говорить о настройках для начала разберем суть этих тегов:

Что такое <title> и для чего он нужен?

Тег title обязательный, он не отображается на самой веб-странице, но несет огромную роль в формировании этой самой страницы. Тайтл показывает пользователю о чем сайт и конкретно данная страница, при сохранении в браузере тайтл сайта и будет сохранен как название этого файла. Поисковые системы при выдаче в поиске вашего ресурса отображают именно тайтл вашей страницы как ссылку на данный ресурс.

Что такое description и для чего он нужен?

Мета тег description существует для краткого описания вашей страницы. Его содержимое используется поисковиками для создания сниппета. Это служебная информация которая не отображается на странице сайта. Тег влияет на позицию выдачи поисковиков и именно он позволяет потенциальному посетителю принять решение переходить на ваш сайт или нет.

Настройка мета тегов Title, Description, Keywords

  1. То что написано в title.
  2. То что написано в description.

Что такое keywords и для чего он нужен?

Keywords так же является мета тегом, в него вбиваются слова по которым вас будут находить через поиск. Таких слов рекомендуется использовать около 30 штук. Именно от правильно выбранных поисковых слов зависит эффективность продвижения вашего сайта в поисковых системах.

Как настроить мета теги WordPress — Title, Description, Keywords

Для удобной и быстрой настройки Title, Description, Keywords в WordPress можно использовать один из плагинов который называется Yoast SEO или All in One SEO Pack, они отлично справляются с задачей, добавляя в WordPress мета теги и много других полезных SEO настроек.

Установить плагин можно с админки WP. После установки и активации All in One SEO Pack к вашей админ панели будет прикреплено дополнительное меню с одноименным названием.

К тому же, данные плагины могут генерировать xml карту сайта, но вы скорее всего будете пользоваться другим инструментом. Так же плагины помогут вам создать файл robots, для чего он нужен можно прочесть тут.

Плагины обладают огромным функционалом, в данный момент нас интересует только настройка Title, Description и Keywords.

Итак, после установки плагина All in One SEO Pack помимо дополнительного меню настроек в админ панели нам добавляется еще один очень важный инструмент. При редактировании или написании страниц или статей в редакторе в самом низу появляются дополнительные настройки.

Настройка мета тегов Title, Description, Keywords

Теперь при написании любой статьи мы сразу же будем проставлять нужные нам заголовки, описания и ключевые слова, не правда ли очень удобно. Очень быстро и удобно можно задать мета теги WordPress сайта.

Так же это можно делать с меню выбора статей для редактирования: заходим в Записи/Все записи и видим также изменения.

Мета теги WordPress, настройка мета тегов Title, Description, Keywords

Как видите мы можем настроить наши теги еще и таким способом. Главная страница настраивается с помощью меню All in One SEO/Основные настройки.

Этого урока по WordPress вы узнали для чего существуют Title, Description, Keywords и как их очень легко настроить, другие возможности All in One SEO Pack, мы рассмотрим в другой статье, перейти→.

Как прописать мета теги в WordPress

От автора: приветствую вас, уважаемые коллеги и любители WordPress 🙂 Все мы хотим видеть наш сайт в ТОПе поисковых систем и иногда этого можно достичь вовсе без денежных вложений, достаточно написать уникальный контент и правильно оформить его. Одной из составляющих правильного оформления являются мета теги. Итак, давайте поговорим о том, как прописать мета теги в WordPress.

Для новичков давайте напомним, что за мета теги нас интересуют. А интересны нам 3 тега, которые отвечают за заголовок страницы — title (его мы видим в названии вкладки в браузере), за описание страницы — description и ключевые слова — keywords. Последние два (description и keywords) можно увидеть только в исходном коде страницы.

Наиболее важным мета тегом здесь является title (название страницы). Именно поэтому на него стоит обратить особое внимание при создании статьи (страницы) в WordPress. В идеале желательно, чтобы title содержал ключевую фразу, под которую пишется та или иная статья.

Относительно мета тегов description и keywords, то на данный момент их роль сведена к минимуму. Раньше их вес был достаточно серьезным при ранжировании сайтов, но сейчас поисковики практически не учитывают их при ранжировании (есть даже мнение, что они не учитываются вовсе).

Однако пренебрегать ими не стоит. Во всяком случае я рекомендовал бы вам обратить внимание на описание страницы — мета тег description. Дело в том, что его содержимое может быть вполне взято поисковиком и использовано в качестве сниппета — небольшого фрагмента текста, который мы видим в качестве описания сайта в результатах поисковой выдачи.

Бесплатный курс «Создание тем на WordPress. Быстрый старт»

Изучите курс и узнайте, как создавать уникальные темы на WordPress с нестандартной структурой страниц

Скачать курс

Как видите, мета теги — штука нужная и полезная, поэтом к их заполнению стоит подходить серьезно, во всяком случае к мета тегу заголовка страницы. Как же прописать мета теги в WordPress? Сделать это на самом деле просто. Давайте узнаем как добавить мета теги в WordPress.

Прописать и использовать теги нам поможет замечательный плагин для WordPress All in One Seo. Если у вас он пока не установлен, тогда скорее установите его или другой его аналог (Yoast SEO, Platinum SEO Pack и т.п.).

Первое, с чего стоит начать — главная страница вашего сайта. Главная страница — это, так сказать, лицо сайта, ведь именно с нее большинство посетителей начинают знакомство с сайтом. Именно поэтому важно заполнить все meta теги для нее. Идем в основные настройки плагина WordPress All in One Seo и находим там целый блок настроек, отвечающий за стартовую страницу сайта WordPress.

Давайте заполним поля заголовка, описания и ключевиков. Я впишу что-то произвольное.

Сохраним изменения и посмотрим результат на главной странице сайта. Во вкладке мы должны увидеть прописанный только что заголовок, а в исходном коде и прочие данные.

Отлично, с главной страницей все понятно. А что делать со статьями, тем самым контентом, который является ключевым для любого сайта? Благодаря плагину со статьями все проще простого. Откроем любую имеющуюся статью или создадим новую. После установки плагина All in One Seo вы должны увидеть много новых полей, которые идут после визуального редактора, в котором мы набираем текст статей.

Заполним мета теги статьи необходимой информацией, которую после сохранения обязательно должны увидеть в исходном коде страницы, на которой опубликована статья.

Как видим, ничего сложного в том, чтобы прописать мета теги в WordPress — нет. Немного усилий с вашей стороны и поисковики уже могут чуть более благосклонно смотреть на ваш сайт. Если вам интересна тема WordPress, тогда больше уроков вы можете найти здесь. Ну а у меня на этом все. Удачи!

Бесплатный курс «Создание тем на WordPress. Быстрый старт»

Изучите курс и узнайте, как создавать уникальные темы на WordPress с нестандартной структурой страниц

Скачать курс

WordPress-Ученик

12 фишек без которых Вы не создадите полноценный сайт на WordPress!

Смотреть

Всем огромный привет! С Вами Денис Повага. Есть один способ в вордпресс, используя который, можно заполнять мета тег Description в вордпресс автоматически. По моим тестам, этот тег не оказывает существенного влияния на развитие сайта. Тем более, с тех времен, когда яндекс сам определяет релевантный сниппет под каждый запрос посетителя. То есть, метаописание страницы, может формироваться исходя из запроса пользователя, и каждый раз может отличаться.

Но в вебмастере Яндекса, Вы могли наблюдать возможную проблему об Отсутсвие мета тега <Description>.

Выглядит это так:

Если нажать по ссылке ознакомиться, то Яндекс покажет ссылки на страницы, где отсутсвует этот мета тег. Там могут быть не только конкретные записи, но и такие разделы сайта, как рубрики или теги (метки). И если рубрик у вас не так много, порядка 10 штук, то понятное дело – нет ничего сложного, написать несколько слов в мета описание (для тег description), чтобы Яндекс не ругался на рубрики.

Содержание

  • Отсутствуют метатеги <Description> в вордпресс – как это исправить?
  • Как добавить Description в вордпресс автоматически?
  • Description автоматический в Yoast, без плагинов и php
  • Почему Description не отображается в Яндекс?
  • Как заполнять Description в вордпресс? Прописываем дескрипшен…
    • Рекомендации по заполнению мета description
    • Бонус. Иконки для мета тега Description

Начнём с разделов…

Для этого переходим в рубрики (аналогично с метками), и выбираем рубрику и в самом низу спускаемся и заполняем несколько слов, о чем эта рубрика. Здесь не нужно много слов. Достаточно 1-3 предложения. Эта информация не будет отображаться на странице, а служит для мета тега Description.

Например: В этом разделе сайта, находятся первые блюда. На случай, если хотите приготовить какой-нибудь суп, то эта рубрика для Вас.

Обратите внимание! У вас должен быть уставлен SEO плагин Yoast SEO, который и позволяет заполнить информацию для мета тега description

Аналогично, можно заполнить краткую информацию для всех рубрик и меток. По сути, углубляться в тему, что и как там заполнять – нет особого смысла. Потому как, улучшать видимость меток и рубрик, мы также будем в школе.  И в приоритете на самом деле – другие моменты (для рубрик и меток – это SEO заголовок, и в некоторых случаях Описание. В некоторых потому, что по сути – продвижение любого раздела важна релевантность информации в этом разделе, и конечно же титульный заголовок помогает улучшить видимость раздела под нужные запросы)

Сейчас нам главное, чтобы Яндекс снял предупреждение об отсутсвие мета тега description.

Хорошо, с этим всё понятно! И здесь можно пробежаться и ручками прописать 1-3 предложения. Ничего сложного!

Но как быть, если у вас 500 записей… Не будете ведь тратить драгоценное время, на заполнение каждого мета описания для записей. Поэтому, Вам поможет 1 способ, используя который, мета описание будет формироваться автоматически…


Как добавить Description в вордпресс автоматически?


Стоить отметить, что такой способо актуален при использовании плагина Yoast SEO. Ведь с помощью этого плагина, можно аналогично как с рубриками, указать мета описание для каждой записи. При этом, если у вас будет вручную указано описание, то применение автоматического способа не повлияет на имеющееся.

Простыми словами, если Вы не указали Description внизу записи, тогда плагин Yoast автоматически соберет первые 120 символов из контента и отобразит их в качестве мета описания, для мета тега description. А в том случае, если метаописание заполнили уникальное для конкретной записи, то значит будет отображен этот текст, который Вы заполняли (автоматический вывод мета описание будет игнорироваться).

Давайте посмотрим, где вручную указывается мета описание для записей:

В самом низу записи, будет возможность указать мета описание для конкретной записи. Раньше, в плагине нужно было выбрать – “изменить сниппет”, а сейчас это поле открыто для измений по умолчанию.

Итак. С ручным способом всё понятно, и признаюсь честно – редко заполняю мета описание и Сео-заголовки. Последний у меня просто дублируется названием статьи (это по умолчанию предусмотрено в рамках плагина Yoast SEO).

А теперь, про автоматический способ…

Description автоматический в Yoast, без плагинов и php

Находясь в админ панеле WordPress, перейдите в настройки плагина Yoast SEO на вкладку “Отображение в поисковой выдаче”. Ранее, эта вкладка называлась – “Заголовки и метаданные”. Далее, выбираем Типы содержимого (ранее Типы записей), и нас интересует поле Мета-описание:

И здесь, мы задаём шаблон для формирования автоматического описания. И в качестве шаблона, будем использовать “Отрывок”, для которого есть следующее имя переменной:

Нужно просто вставить в поле “мета-описания:” Данный код:

В итоге у Вас должно получиться, как показано на скриншоте ниже:

То есть, вам не нужно писать слово Отрывок, а просто вставляете этот код в поле %%excerpt%% и он автоматом поменяется на “Отрывок”. Вот и всё!

Теперь, для тех записей, где не указано мета описание, будет автоматически формироваться отрывок из первых 120 символов.

Почему Description не отображается в Яндекс?

Бывает так, что Вы указали дескрипшен, а он не отображается… И скорее всего, так и будет для многих запросов, по которым видите сайт в результатх поиска. Это нормальная ситауция. Давайте вспомним, как всё было…

Ранее, в поисковых системах, этот тег был одним из факторов для успешного развития сайта (скорее даже для правильного отображения на поиске), наряду ещё с одним мета тегом, под названием keywords (тег ключевых слов). Суть этих тегов в том, чтобы помочь поисковому роботу определить правильное содержание страницы (в случае с дескрипшен). Но слово “содержание”, правильней взять в кавычки, и скорее это краткое содержимое страницы. И его заполняли раньше активно, наряду с мета тегом  keywords. И в коде страницы, эти теги выглядели так:

<html>
 <head>
...
  <meta name="description" content="Краткое содержимое страницы" />
  <meta name="keywords" content="ключевые слова" />
...
 </head>
<body>
...
</body>
</html>

И выше самый простой пример, как выглядят страницы сайта в интернете на самом деле, и то как видит их поисковый робот, читая информацию внутри содержимого специальных тегов.  Так, есть парный тег <head> </head>, который является контейнером для других элементов, среди которых, могут содержаться различные метаданные о странице, а также заголовок title, и ссылки на скрипты и таблицы стилей.

Так вот, про метаданные – это не парные теги, и у каждого из них – есть свои цели. Так, description – содержит в себе краткое описание страницы, чтобы посетитель мог понять, что его ждёт на странице. А keywords – помогал роботу определить, под какие поисковые фразы продвигается страница. Это знаете, когда поисковые алгоритмы были не настолько совершенны, и обращали на этот мета тег больше внимания. И все вебмастера, старались разместить в этот тег, как можно больше ключевых фраз через запятую. Как всё просто… Не так ли? ))

Раньше была такая ситуация, что содержимое из мета тега description, отображалось в сниппетах поисковой системы. И касаемо дескрипшен, конкретно в этом месте…

И это содержимое бралось не из контента страницы, а из тега description. Также титульный заголовок (title) брался исключительно из заголовка, который располагался между тегов titile. И вот пример, как это выглядит в коде страницы, между тегов head:

Раньше большой “упор” делали на титульный заголовок, и другие заголовки по значимости (h1,h2,h3 и др.). И конечно же, много много ключевых слов вствляли в мета тег keywords. Вот только прошло время, и поисковая система уже сама определяет наиболее релевантный сниппет под каждый запрос посетителя. И значимость заголовков, сейчас выше, чем была раньше. В том плане выше, что делать приоритет только на титульный заголовок – не правильно. h1,h2,h3 – также могут подставляться в сниппет поисковой системы, не зависимо от информации в титульном заголовке. Хотя он и является обязательным. На большинстве сайтов, мы его просто дублируем с h1 заголовком.

Тоже самое, и с мета тегом description. Его значимость можно сказать – минимальна, и большого приоритета в нем не наблюдается. Гугл так и вовсе не делает на него акцент, если не врут источники. Хорошо.

Посмотите, пример…

Вбиваем другой запрос, и нам эта же страница, выводится с другим заголовком и другим кратким описанием. То есть, поисковый робот сам посчитал, что правильней отобразить посетителю под запрос. Анализируется страница, и выдергиваются нужные данные для сниппета. И под каждый запрос – данные отличаются (сравните со скрином выше, отображается одна и таже страница, только с разными сниппетами описания и заголовка).

Не сложно догадаться, что мета тег keywords вовсе не актуален сейчас. И смысла его заполнять нет, так как это скорее вызовет обратный эффект в продвижении сайта. Гугл открыто заявлял, что с 2007 года, не учитывает этот тег. Для яндекса, ситуация аналогична с этим мета тегом, хотя где-то есть отголоски того, что возможно есть учет ключевых слов в этом мета теги. В современном мире, значимость мета тега keywords по 10 бальной шкале, была бы скорее всего равна 0. Но это моё мнение.

Касаемо же description, здесь ситуация неоднозначна. Но его значимость по 10 бальной шкале можно отнести к 1. То есть, минимальна! Но несмотря на его малую значимость – тег является действующим, со стороны Яндекса.

Возникает вопрос…

Как заполнять Description в вордпресс? Прописываем дескрипшен…

Если вернуться к теме рецептов, то для рецепта плова, пример мета описание может быть таким: “Вкусный рецепт плова в казане на костре, который можно повторить в домашних условиях на плите. Мясо используем говядину

или другой вариант, который подсмотрел на блоге Маргариты – Секреты домоводства:

Наиболее полный пошаговый рецепт приготовления узбекского плова с говядиной. Подробное описание позволит с легкостью приготовить настоящий узбекский плов

Знаете, здесь также можно упоминать пару ключевых фраз, но делать это агрессивно не рекомендуется. Опять же, это тот случай, если мета описание указываете вручную. А если оно у вас будет автоматом формироваться по открывку записи, то смысла о нем задумываться нету. Гораздо правильней задуматься о вступлении… Потому как, первые 120 символов пойдут на мета описание, и при этом… то как начинается ваша статья – весьма привлекательно для посетителя. И всегда в приоритете думать о контенте.

Простыми словами, при автоматическом формировании мета описания, с помощью кода %%excerpt%% , можно позабыть о том, что не заполнили дескрипшен. Просто работайте как и работали ранее, а мета описания будут уже заполнены. Но в том случае, если решитесь заполнить его вручную для конкретной записи, то просто отрывок внизу записи стираете, и прописываете своё описание.

Например, так:

Рекомендации по заполнению мета description

Уникальность и полезность описания

Старайтесь указывать уникальное и полезное описание, чтобы оно было одновременно емким, и при этом содержательным. Коротко и ясно выражайте суть содержимого страницы. Как и в случае с заголовками, размещайте наиболее важную информацию ближе к началу текста.

Точное мета описание

Информация в этом поле, должна быть релевантной и не вводить заблуждение пользователей. Так, многие злоупотребляют этим полем, стараясь повысить кликабельность сниппета, намеренно применяя кричащие слова – Кликай, Здесь, Жми. Но злоупотреблять этим не нужно. Скорее даже – не делайте так. Информация должна быть емкой и точно соответсвовать странице. Если речь про пельмени, то описание соответсвующе. Указывать информацию про вареники в дескрипшен статьи о пельменях, будет не совсем правильно. Опять же, здесь нет смысла перечислять важные слова, надеясь, что поисковая система обратит внимание на ключевые слова из мета описание. Но если 1-2 ключа гармонично вписываются в предложение, то можно это практиковать.

Длина мета описания

Не используйте короткое описание в пару слов. Ведь в рамках короткого словосочетания – не получится изложить суть страницы, которую правильней рассмотреть в 1-3 предложений. Удобно, что в плагине Yost SEO имеется специальная зеленая шкала, помогающая определить оптимальную длину. Но брать это за точное правило – также не правильно. Каждый раз, длина мета описания может быть разной. Но если оно будет опредлеенной длины – это не является ошибкой. До 150 символов будет оптимально.

Не злоупотребляйте кричащими словами

Мета-описание должно быть простым и понятным, без чрезмерного употребления ключевых слов, заглавных букв, рекламных слоганов, лишних символов (для «украшения») и восклицательных знаков.

Хотя знаете, в кулинарной тематике, периодически наблюдаю такой трюк, что в метаописание кидают несколько html символов, которые немного украшают сниппет, в случае если он формируется из мета тега.

Вот несколько примеров, которые устал искать в выдаче ))

Сказать, что так нужно делать обязательно – не думаю. Но если хотите, в некоторых случая можете проводить эксперименты со своими статьями. Например, находясь на 7 или 9 позиции, и получая трафик на статью, попробуйте указать метаописание с 1-2 спецсимволами, и проверить эффективость. Вдруг, статья поднимется на пару позиций выше.

Бонус. Иконки для мета тега Description

Бонус для тех, кто дочитал до конца. Специальные иконки по кулинарной тематике. Просто копируйте нужную, и вставляйте в мета описание при ручном заполнении.

☕👌👍⏳ 🍝🍛 🍭🍰🎂🍾🥂🍵🍴🍽🍳🍕🍖🥘🥣🥞🍗🌯🧂🥒🍒🍎🍏🍇🌶🥃

Правой кнопкой мыши…

Всем отличного настроения и до новых встреч!

If you’re not adding meta descriptions to your website, you’re missing out on a big chance to attract and convert new visitors. It may not seem like a big deal, but a targeted snippet that appears in search engine results can make a huge difference. Without one, you could be losing clicks.

Meta descriptions are the short snippets that appear on search results pages like Google and Bing. You can customize them to better describe each page, drawing in new users and making your search results stand out from competing websites.

Adding a meta description can be as easy as filling out a box or inserting a line of code.

Ready to get more clicks? We’ll show you how to add a meta description in WordPress with and without a plugin.

Prefer to watch the video version?

What is a Meta Description?

Search engines like Google use a robot called a web crawler to index your site. The info this gives them allows them to display it properly in search results, so you can be found when people search for relevant keywords.

But since this program is just, well, a program, it doesn’t automatically know what your site is about. You have to tell it using different elements such as sitemaps, schema markup, and meta tags, just to name a few. That’s why a meta description is so important.

kinsta meta description

Example of a meta description

Users see a page’s meta description below the title in the search results. The meta description is meant to inform them about the content and purpose of a webpage so they can decide whether to click on it or not. In this example, you can also see sitelinks:

kinsta search results

Example of sitelinks

Google’s crawlers are better than they once were. In fact, they can now extract a title and meta description automatically, and figure out a page’s topic without you having to manually define keywords.

If you don’t write your own meta description, Google will generate one for you by pulling content from the page. But you could be missing out on a chance to convince people to click on the link with a targeted snippet customized to earn conversions.

How Meta Descriptions Impact Your SEO

Meta descriptions actually don’t have a direct effect on your SEO ranking, yet Google still advises to create unique ones for each page of your site. It’s the keywords found naturally in your content that are important for SEO.

What meta descriptions do impact is click-through rate (CTR), or how many people decide to click on your site.

Think about the last time you Googled something. What made you pick a certain link? It was probably the title, the description, or both that convinced you.

backlinko

Meta descriptions positively impact CTR (Image source: Backlinko.com)

According to Backlinko, unique meta descriptions have a major impact on CTR:

“Writing unique meta descriptions for each page can increase your site’s organic CTR. We found that pages with a meta description had a 5.8% higher CTR compared to pages without a description.”

Search engines may automatically generate a snippet, but if that description doesn’t do a good job conveying what your content is about, people will ignore it and choose another website.

Writing your own meta descriptions ensures that you have more control over what people see.

I said “more control”, not “total control.” Google won’t always use your meta description, though.

Sometimes it will show parts of a page’s content that’s more relevant to a user’s search. But in most cases, it prefers to fall back to the snippet you provided rather than using an auto-generated one.

A well-written meta description plays a big part in attracting and converting visitors. It may not directly affect SEO, but it will gain you more interested visitors, and higher CTR does give your rankings a boost.

Meta Description vs Meta Keyword

Metadata as a whole is a set of HTML tags that tell search engines and web crawlers what your site is about. These include the title, description, and keywords.

You already know that a meta description is the HTML element that describes a webpage’s content and purpose.

Meta keywords are a relic of an older internet. In other words, they’ve been deprecated and are no longer in use. In the past, they were used to tell search engines what topics a page covered, similar to how you tag a social media or blog post.

However, once people realized that you could put any unrelated keyword in and get free traffic from topics your site had nothing to do with (hello “free porn” and “free mp3”), search engines removed support for the feature. You can still add meta keywords, but for the most popular search engines, it won’t do anything.

Now, Google examines a website’s content using more sophisticated web crawlers that can automatically figure out what topics are related to the content you write about on a page. It completely ignores the meta keywords attribute.

Instead of using meta keywords, improving SEO is now about optimizing natural keyword usage within your content and address other technical aspects like the speed of your site.

5 Tip For Writing and Optimizing a Meta Description in WordPress

When it comes to meta descriptions, there are no hard and fast rules to follow. But there are still some best practices you should keep in mind. These can help you rise above the competition and increase your click-through rate.

Let’s go over each of these best practices, so you can write better meta descriptions.

Prefer to watch the video version?

1. Ideal Snippet Length

You can’t make your snippet an unlimited length. If you exceed a certain number of characters, it will be truncated. Your meta descriptions can be as short as you want but don’t go over 155-160 characters, or it’s likely to be cut off abruptly. That doesn’t look good.

snippet length

Another example of a meta description

2. Focus on a Keyword

It’s a good idea to include a keyword in every snippet you write. If you’re creating a snippet for a blog post, you can target the same keyword you wrote the article with. Otherwise, do some keyword research and choose one that’s aligned with your goals.

Including a keyword will help you structure your description in a compelling way. Plus, Google sometimes highlights keywords that match users’ search terms. Targeting a popular keyword and including it in your description may result in bold, noticeable text.

query

Bolded text when related to the query

3. Write Clear, Cohesive, and Captivating Descriptions

Your meta description is like a free advertisement, so take it as a chance to convert potential visitors. Address the reader directly, pulling them in by posing a question or problem, then outlining the benefits of clicking your link. Use vivid imagery, eye-grabbing statements, or information-rich sentences.

Most importantly, earn your click by proving that your website has exactly what people are looking for. Do you have the best services or products, or the information they’ve been searching for? What do you have to offer that your competitors don’t?

Ensure that your snippet is high-quality and free of awkward phrasing, repetition, or grammatical errors that could turn people away.

Consider including a call to action, like “save money”, “read our review”, or “learn more about meta tags”. Avoid awkward-sounding CTAs like “click here”, however. Many sites opt to skip the call to action and focus on providing valuable information; see what sounds right to you.

cta

Make your meta description appealing

Lastly, make it clear what will happen when your link is clicked. Will they be reading a blog post, browsing the store, or landing on a features page? It should be obvious where they’re going and what they’ll find when they get there.

4. Avoid Duplicate Snippets

Meta descriptions present a free chance to reach out to potential customers and convert them, so don’t waste it by creating duplicate or carbon copy snippets, meta descriptions that are the same or nearly the same across multiple webpages.

When you have hundreds or thousands of pages on your site, it may seem like a good idea to just use a template and swap out a few details. But duplicate descriptions just don’t look good, especially when they cover more than a handful of pages. People will quickly tune out your website’s results.

A default meta description is better than a bad one. If you don’t have the time to add a carefully written, compelling snippet to every single page, it’s better to let Google do the work and focus on a few key pages.

5. Don’t Be Deceptive

Meta descriptions may not improve your SEO, but they can certainly damage your click-through rate if you engage in deliberately deceptive behavior.

Ensure that your description is accurate. Just be honest about what people are clicking on first and foremost. Don’t lie about what a page contains.

Avoid keyword stuffing. It’s awkward to read and will result in reduced CTR, plus it might get you penalized or result in Google ignoring your custom description entirely.

Keep these tips in mind and you’ll create better meta descriptions.

Writing Meta Descriptions for Specific Pages

The techniques for crafting a meta description are similar at their core, but each type of page needs its own special touch. The way you write a snippet for a blog post, homepage, and product page varies quite a bit.

Here are some tips for writing a meta description for a few key types of pages.

Homepage Meta Descriptions

Homepage descriptions get special treatment. This is the face of your website, so you have to make it count. Many websites write a short, one-sentence pitch, never even reaching the 160-character limit.

homepage meta description

WordPress.com meta description

Your job here is to sell your brand. Hit hard with a short, snappy, well-written piece that explains concisely what you do and why they should choose you. This goes for similar pages just as your About and Mission Statement.

Blog Post Meta Descriptions

For primarily informational pages such as blog posts, you may not want your description to read like a blatant advertisement. Of course, you are making a pitch and can include a call to action, but focus on the information.

When people go looking for a solution to a problem, they don’t want to be advertised to. They want answers. Tell people what they’ll learn when they click this link, and prove that you know what you’re talking about.

blog meta description

Meta description for a blog post

Category Pages Meta Descriptions

There are also category pages to consider. This is a hard one to write for. Most searches won’t turn up a category archive, but you shouldn’t miss out on an opportunity to create a compelling, converting snippet.

Your best bet is to entice people by giving them a hint of the type of posts they’ll find in this category, and get them in a reading mood.

category meta

Meta description for a category page

For news-based websites and ecommerce stores, category pages play a key role as they can be crucial pages able to score higher rankings and more traffic if well optimized.

Product Page Meta Descriptions

Speaking of online stores… Product pages will pop up in the search results when people are looking to buy something and fast.

Instead of promoting your website, focus on the individual product. Use similar tactics: write something that quickly explains what this is and why they need it.

You might also include specifications such as price and other product info.

product meta

Meta description for a product page

You should ideally be writing a unique meta description for every product. It might be tempting to just use a template and swap out the product name, but this generic approach won’t do as well as a hand-written pitch.

How to Add a Meta Description with Yoast SEO

If you want to add custom meta descriptions to your site, your best bet is installing an SEO plugin. Any popular SEO plugin will make it easy for you to write snippets for all of your pages and blog posts.

While it’s possible to add them manually, it means editing site files. On some setups, this might be impossible without FTP access, which complicates things even further. Plus, there’s no easy way to add individual descriptions to each page without a plugin. All the simplest solutions only set a default snippet for the whole site.

For most people, it’s best to just install a WordPress plugin instead of dealing with the headache.

You can use a simple and direct plugin like WP Meta SEO or a more fully-featured SEO suite. Some popular SEO plugins include Yoast SEO and The SEO Framework. Since Yoast is the most widely used, we’ll show you how to add a meta description with that one.

Let’s install Yoast now. You can either visit its plugin repository page or log in to your WordPress backend and head over to Plugins > Add New. Search for Yoast and download it, or upload the zip file you installed earlier.

Install Yoast SEO plugin

Install Yoast SEO plugin

Then just activate the plugin in Plugins > Installed Plugins to get it working.

Add a Meta Description to Posts and Pages with Yoast SEO

Yoast will add a new SEO tab to your admin backend. You can go here to configure settings, including defaults and how your pages look on social media. But to get to the individual meta description editor, you’ll need to open up an existing post or page or create a new one.

Scroll down below the editing area and you’ll see the new Yoast section. Click Edit Snippet and start typing in the Meta Description section. The bar at the bottom will turn green once you’ve hit the optimal character length. You can also add dynamic variables that will display elements like title or category.

meta description yoast

How to add a meta description in Yoast SEO

That’s all you need to do to create a custom meta description for any post or page on your website.

Add a Meta Description to Your Homepage with Yoast SEO

Adding a snippet for your homepage works a little differently than normal in Yoast. Go to SEO > Search Appearance.

Right there you’ll see the Homepage section, with the normal editor UI. Just write a description and title as you did before.

yoast seo

Yoast SEO’s settings

Remember that writing a homepage snippet is a sales pitch for your site as a whole. Describe your company or blog, what you do, and what you have to offer. When you’re finished, click Save Changes.

With that, your homepage search results should soon update to show its new meta description.

Add a Default Meta Description with Yoast SEO

What if you want to add a default meta description that appears whenever you fail to set a custom one? That’s easy. Under SEO > Search Appearance > Content Types (check the tabs at the top of the Search Appearance page), you’ll see two drop-downs, one for posts and one for pages.

content types

Adding a default meta description

These also use the typical metadata editor, so go ahead and add a default snippet for posts and pages.

Now when you create a new post or page, the meta description will automatically use the info you put here. That way, if you publish a blog post and forget to add a snippet, it will just fall back to what you put here.

If you like basing them off a template, you could also paste it here, and it will appear on the editing screen ready to be filled out when you make a new post.

Add Meta Description for Category Archives with Yoast SEO

What about your category pages? These small archives don’t have a lot of text content, which can confuse Google and cause it to display a broken or strange-looking snippet. You can add a short excerpt yourself to avoid this.

Go to SEO > Search Appearance > Taxonomies and create your description in the editor. Or you can go to Posts > Categories and write up a new one for each individual category archive page.

description category

Example of a meta description for a category page

This snippet doesn’t need to be too complicated. You can still make a small pitch like “Discover dozens of (category) posts here”, but you don’t need to be as stringent since it’s unlikely that this page will pop up frequently in search results.

That wraps up everything you’ll need to know about adding meta descriptions with Yoast.

How to Add a Meta Description Without a Plugin

If you don’t want to install an SEO plugin to create custom meta descriptions, you can instead edit your theme files. However, it can be a bit of a pain, especially if you want to add descriptions to individual pages.

Downloading a plugin will probably be easier for you. But if you really don’t want to, here’s how to do it manually.

Before editing any files on your site, make sure to do a backup. It’s also a good idea to create a child theme, as it protects your site if you make a mistake and doesn’t reset your changes when WordPress updates.

We’ll create some generic meta tags that will apply to every page on your site. First, you’ll want to go to Settings > General. Under Tagline, write the meta description you want to represent your site.

Editing your theme files to add a meta description

Editing your theme files to add a meta description

Next, go to Appearance > Theme Editor. If you can’t see it, you may need to access your header.php using FTP.
Look in the sidebar and find Theme Header (header.php) and click to edit it. Paste in this code anywhere between <head> and </head>.

<meta name="description" content="" />

This will add the tagline to every page on your site.

Obviously, this isn’t very desirable for your blog posts. You’re more likely to get clicks if people know what each post is about, rather than getting a generic description.

Using this code, search engines will just grab content from the post to use in the meta description like normal.

<meta name="description" content="<?php if ( is_single() ) {
        single_post_title('', true); 
    } else {
        bloginfo('name'); echo " - "; bloginfo('description');
    }

With these two pieces of programming, you’ll get a tailored description on your generic pages like the homepage and category archives, but your posts will have a normal snippet.

What if you want to add individual descriptions for each page? This tends to get a lot more complicated, and it’s best to just use a plugin for that. But you can do it with a conditional tag or with custom fields.

Meta descriptions are powerful tools in your hands to increase your click-through rate. Learn how to add them to your #WordPress site and improve your conversions! ✍️🎯Click to Tweet

Summary

Without targeted, precisely written meta descriptions, you could be missing out on clicks and conversions. Letting Google generate snippets is hit or miss. By writing your own, you get an opportunity to “make a pitch” and ensure that users can make a fully informed decision.

As research shows, custom meta descriptions are able to increase your CTR up to 5.8%, which is a good outcome considering the little resources you might need to craft them out. In fact, to add a meta description in WordPress, you can either edit your WordPress files manually or use an SEO plugin to get control over your snippets.

I know, custom meta descriptions may require more time than you anticipated, but it’s an activity worth doing for the long-term results.


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

If you’re not adding meta descriptions to your website, you’re missing out on a big chance to attract and convert new visitors. It may not seem like a big deal, but a targeted snippet that appears in search engine results can make a huge difference. Without one, you could be losing clicks.

Meta descriptions are the short snippets that appear on search results pages like Google and Bing. You can customize them to better describe each page, drawing in new users and making your search results stand out from competing websites.

Adding a meta description can be as easy as filling out a box or inserting a line of code.

Ready to get more clicks? We’ll show you how to add a meta description in WordPress with and without a plugin.

Prefer to watch the video version?

What is a Meta Description?

Search engines like Google use a robot called a web crawler to index your site. The info this gives them allows them to display it properly in search results, so you can be found when people search for relevant keywords.

But since this program is just, well, a program, it doesn’t automatically know what your site is about. You have to tell it using different elements such as sitemaps, schema markup, and meta tags, just to name a few. That’s why a meta description is so important.

kinsta meta description

Example of a meta description

Users see a page’s meta description below the title in the search results. The meta description is meant to inform them about the content and purpose of a webpage so they can decide whether to click on it or not. In this example, you can also see sitelinks:

kinsta search results

Example of sitelinks

Google’s crawlers are better than they once were. In fact, they can now extract a title and meta description automatically, and figure out a page’s topic without you having to manually define keywords.

If you don’t write your own meta description, Google will generate one for you by pulling content from the page. But you could be missing out on a chance to convince people to click on the link with a targeted snippet customized to earn conversions.

How Meta Descriptions Impact Your SEO

Meta descriptions actually don’t have a direct effect on your SEO ranking, yet Google still advises to create unique ones for each page of your site. It’s the keywords found naturally in your content that are important for SEO.

What meta descriptions do impact is click-through rate (CTR), or how many people decide to click on your site.

Think about the last time you Googled something. What made you pick a certain link? It was probably the title, the description, or both that convinced you.

backlinko

Meta descriptions positively impact CTR (Image source: Backlinko.com)

According to Backlinko, unique meta descriptions have a major impact on CTR:

“Writing unique meta descriptions for each page can increase your site’s organic CTR. We found that pages with a meta description had a 5.8% higher CTR compared to pages without a description.”

Search engines may automatically generate a snippet, but if that description doesn’t do a good job conveying what your content is about, people will ignore it and choose another website.

Writing your own meta descriptions ensures that you have more control over what people see.

I said “more control”, not “total control.” Google won’t always use your meta description, though.

Sometimes it will show parts of a page’s content that’s more relevant to a user’s search. But in most cases, it prefers to fall back to the snippet you provided rather than using an auto-generated one.

A well-written meta description plays a big part in attracting and converting visitors. It may not directly affect SEO, but it will gain you more interested visitors, and higher CTR does give your rankings a boost.

Meta Description vs Meta Keyword

Metadata as a whole is a set of HTML tags that tell search engines and web crawlers what your site is about. These include the title, description, and keywords.

You already know that a meta description is the HTML element that describes a webpage’s content and purpose.

Meta keywords are a relic of an older internet. In other words, they’ve been deprecated and are no longer in use. In the past, they were used to tell search engines what topics a page covered, similar to how you tag a social media or blog post.

However, once people realized that you could put any unrelated keyword in and get free traffic from topics your site had nothing to do with (hello “free porn” and “free mp3”), search engines removed support for the feature. You can still add meta keywords, but for the most popular search engines, it won’t do anything.

Now, Google examines a website’s content using more sophisticated web crawlers that can automatically figure out what topics are related to the content you write about on a page. It completely ignores the meta keywords attribute.

Instead of using meta keywords, improving SEO is now about optimizing natural keyword usage within your content and address other technical aspects like the speed of your site.

5 Tip For Writing and Optimizing a Meta Description in WordPress

When it comes to meta descriptions, there are no hard and fast rules to follow. But there are still some best practices you should keep in mind. These can help you rise above the competition and increase your click-through rate.

Let’s go over each of these best practices, so you can write better meta descriptions.

Prefer to watch the video version?

1. Ideal Snippet Length

You can’t make your snippet an unlimited length. If you exceed a certain number of characters, it will be truncated. Your meta descriptions can be as short as you want but don’t go over 155-160 characters, or it’s likely to be cut off abruptly. That doesn’t look good.

snippet length

Another example of a meta description

2. Focus on a Keyword

It’s a good idea to include a keyword in every snippet you write. If you’re creating a snippet for a blog post, you can target the same keyword you wrote the article with. Otherwise, do some keyword research and choose one that’s aligned with your goals.

Including a keyword will help you structure your description in a compelling way. Plus, Google sometimes highlights keywords that match users’ search terms. Targeting a popular keyword and including it in your description may result in bold, noticeable text.

query

Bolded text when related to the query

3. Write Clear, Cohesive, and Captivating Descriptions

Your meta description is like a free advertisement, so take it as a chance to convert potential visitors. Address the reader directly, pulling them in by posing a question or problem, then outlining the benefits of clicking your link. Use vivid imagery, eye-grabbing statements, or information-rich sentences.

Most importantly, earn your click by proving that your website has exactly what people are looking for. Do you have the best services or products, or the information they’ve been searching for? What do you have to offer that your competitors don’t?

Ensure that your snippet is high-quality and free of awkward phrasing, repetition, or grammatical errors that could turn people away.

Consider including a call to action, like “save money”, “read our review”, or “learn more about meta tags”. Avoid awkward-sounding CTAs like “click here”, however. Many sites opt to skip the call to action and focus on providing valuable information; see what sounds right to you.

cta

Make your meta description appealing

Lastly, make it clear what will happen when your link is clicked. Will they be reading a blog post, browsing the store, or landing on a features page? It should be obvious where they’re going and what they’ll find when they get there.

4. Avoid Duplicate Snippets

Meta descriptions present a free chance to reach out to potential customers and convert them, so don’t waste it by creating duplicate or carbon copy snippets, meta descriptions that are the same or nearly the same across multiple webpages.

When you have hundreds or thousands of pages on your site, it may seem like a good idea to just use a template and swap out a few details. But duplicate descriptions just don’t look good, especially when they cover more than a handful of pages. People will quickly tune out your website’s results.

A default meta description is better than a bad one. If you don’t have the time to add a carefully written, compelling snippet to every single page, it’s better to let Google do the work and focus on a few key pages.

5. Don’t Be Deceptive

Meta descriptions may not improve your SEO, but they can certainly damage your click-through rate if you engage in deliberately deceptive behavior.

Ensure that your description is accurate. Just be honest about what people are clicking on first and foremost. Don’t lie about what a page contains.

Avoid keyword stuffing. It’s awkward to read and will result in reduced CTR, plus it might get you penalized or result in Google ignoring your custom description entirely.

Keep these tips in mind and you’ll create better meta descriptions.

Writing Meta Descriptions for Specific Pages

The techniques for crafting a meta description are similar at their core, but each type of page needs its own special touch. The way you write a snippet for a blog post, homepage, and product page varies quite a bit.

Here are some tips for writing a meta description for a few key types of pages.

Homepage Meta Descriptions

Homepage descriptions get special treatment. This is the face of your website, so you have to make it count. Many websites write a short, one-sentence pitch, never even reaching the 160-character limit.

homepage meta description

WordPress.com meta description

Your job here is to sell your brand. Hit hard with a short, snappy, well-written piece that explains concisely what you do and why they should choose you. This goes for similar pages just as your About and Mission Statement.

Blog Post Meta Descriptions

For primarily informational pages such as blog posts, you may not want your description to read like a blatant advertisement. Of course, you are making a pitch and can include a call to action, but focus on the information.

When people go looking for a solution to a problem, they don’t want to be advertised to. They want answers. Tell people what they’ll learn when they click this link, and prove that you know what you’re talking about.

blog meta description

Meta description for a blog post

Category Pages Meta Descriptions

There are also category pages to consider. This is a hard one to write for. Most searches won’t turn up a category archive, but you shouldn’t miss out on an opportunity to create a compelling, converting snippet.

Your best bet is to entice people by giving them a hint of the type of posts they’ll find in this category, and get them in a reading mood.

category meta

Meta description for a category page

For news-based websites and ecommerce stores, category pages play a key role as they can be crucial pages able to score higher rankings and more traffic if well optimized.

Product Page Meta Descriptions

Speaking of online stores… Product pages will pop up in the search results when people are looking to buy something and fast.

Instead of promoting your website, focus on the individual product. Use similar tactics: write something that quickly explains what this is and why they need it.

You might also include specifications such as price and other product info.

product meta

Meta description for a product page

You should ideally be writing a unique meta description for every product. It might be tempting to just use a template and swap out the product name, but this generic approach won’t do as well as a hand-written pitch.

How to Add a Meta Description with Yoast SEO

If you want to add custom meta descriptions to your site, your best bet is installing an SEO plugin. Any popular SEO plugin will make it easy for you to write snippets for all of your pages and blog posts.

While it’s possible to add them manually, it means editing site files. On some setups, this might be impossible without FTP access, which complicates things even further. Plus, there’s no easy way to add individual descriptions to each page without a plugin. All the simplest solutions only set a default snippet for the whole site.

For most people, it’s best to just install a WordPress plugin instead of dealing with the headache.

You can use a simple and direct plugin like WP Meta SEO or a more fully-featured SEO suite. Some popular SEO plugins include Yoast SEO and The SEO Framework. Since Yoast is the most widely used, we’ll show you how to add a meta description with that one.

Let’s install Yoast now. You can either visit its plugin repository page or log in to your WordPress backend and head over to Plugins > Add New. Search for Yoast and download it, or upload the zip file you installed earlier.

Install Yoast SEO plugin

Install Yoast SEO plugin

Then just activate the plugin in Plugins > Installed Plugins to get it working.

Add a Meta Description to Posts and Pages with Yoast SEO

Yoast will add a new SEO tab to your admin backend. You can go here to configure settings, including defaults and how your pages look on social media. But to get to the individual meta description editor, you’ll need to open up an existing post or page or create a new one.

Scroll down below the editing area and you’ll see the new Yoast section. Click Edit Snippet and start typing in the Meta Description section. The bar at the bottom will turn green once you’ve hit the optimal character length. You can also add dynamic variables that will display elements like title or category.

meta description yoast

How to add a meta description in Yoast SEO

That’s all you need to do to create a custom meta description for any post or page on your website.

Add a Meta Description to Your Homepage with Yoast SEO

Adding a snippet for your homepage works a little differently than normal in Yoast. Go to SEO > Search Appearance.

Right there you’ll see the Homepage section, with the normal editor UI. Just write a description and title as you did before.

yoast seo

Yoast SEO’s settings

Remember that writing a homepage snippet is a sales pitch for your site as a whole. Describe your company or blog, what you do, and what you have to offer. When you’re finished, click Save Changes.

With that, your homepage search results should soon update to show its new meta description.

Add a Default Meta Description with Yoast SEO

What if you want to add a default meta description that appears whenever you fail to set a custom one? That’s easy. Under SEO > Search Appearance > Content Types (check the tabs at the top of the Search Appearance page), you’ll see two drop-downs, one for posts and one for pages.

content types

Adding a default meta description

These also use the typical metadata editor, so go ahead and add a default snippet for posts and pages.

Now when you create a new post or page, the meta description will automatically use the info you put here. That way, if you publish a blog post and forget to add a snippet, it will just fall back to what you put here.

If you like basing them off a template, you could also paste it here, and it will appear on the editing screen ready to be filled out when you make a new post.

Add Meta Description for Category Archives with Yoast SEO

What about your category pages? These small archives don’t have a lot of text content, which can confuse Google and cause it to display a broken or strange-looking snippet. You can add a short excerpt yourself to avoid this.

Go to SEO > Search Appearance > Taxonomies and create your description in the editor. Or you can go to Posts > Categories and write up a new one for each individual category archive page.

description category

Example of a meta description for a category page

This snippet doesn’t need to be too complicated. You can still make a small pitch like “Discover dozens of (category) posts here”, but you don’t need to be as stringent since it’s unlikely that this page will pop up frequently in search results.

That wraps up everything you’ll need to know about adding meta descriptions with Yoast.

How to Add a Meta Description Without a Plugin

If you don’t want to install an SEO plugin to create custom meta descriptions, you can instead edit your theme files. However, it can be a bit of a pain, especially if you want to add descriptions to individual pages.

Downloading a plugin will probably be easier for you. But if you really don’t want to, here’s how to do it manually.

Before editing any files on your site, make sure to do a backup. It’s also a good idea to create a child theme, as it protects your site if you make a mistake and doesn’t reset your changes when WordPress updates.

We’ll create some generic meta tags that will apply to every page on your site. First, you’ll want to go to Settings > General. Under Tagline, write the meta description you want to represent your site.

Editing your theme files to add a meta description

Editing your theme files to add a meta description

Next, go to Appearance > Theme Editor. If you can’t see it, you may need to access your header.php using FTP.
Look in the sidebar and find Theme Header (header.php) and click to edit it. Paste in this code anywhere between <head> and </head>.

<meta name="description" content="" />

This will add the tagline to every page on your site.

Obviously, this isn’t very desirable for your blog posts. You’re more likely to get clicks if people know what each post is about, rather than getting a generic description.

Using this code, search engines will just grab content from the post to use in the meta description like normal.

<meta name="description" content="<?php if ( is_single() ) {
        single_post_title('', true); 
    } else {
        bloginfo('name'); echo " - "; bloginfo('description');
    }

With these two pieces of programming, you’ll get a tailored description on your generic pages like the homepage and category archives, but your posts will have a normal snippet.

What if you want to add individual descriptions for each page? This tends to get a lot more complicated, and it’s best to just use a plugin for that. But you can do it with a conditional tag or with custom fields.

Meta descriptions are powerful tools in your hands to increase your click-through rate. Learn how to add them to your #WordPress site and improve your conversions! ✍️🎯Click to Tweet

Summary

Without targeted, precisely written meta descriptions, you could be missing out on clicks and conversions. Letting Google generate snippets is hit or miss. By writing your own, you get an opportunity to “make a pitch” and ensure that users can make a fully informed decision.

As research shows, custom meta descriptions are able to increase your CTR up to 5.8%, which is a good outcome considering the little resources you might need to craft them out. In fact, to add a meta description in WordPress, you can either edit your WordPress files manually or use an SEO plugin to get control over your snippets.

I know, custom meta descriptions may require more time than you anticipated, but it’s an activity worth doing for the long-term results.


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

Оптимизируйте свой сайт для поисковых систем и социальных сетей с помощью дополнительных опций и инструментов поисковой оптимизации.

Эта функция доступна для сайтов с тарифными планами WordPress.com Business или eCommerce. Если на вашем сайте действует один из устаревших тарифных планов, этот раздел доступен для плана Pro.

Содержание

Метаописание главной страницы

Метаописание — это обзор содержимого вашего сайта. Иногда поисковые системы используют эти данные, чтобы определить соответствие сайта конкретным поисковым запросам.

Этот параметр метаописания применяется только к главной странице вашего сайта. Для доступа к метаописанию главной страницы откройте настройки трафика в разделе Инструменты → Маркетинг → Посещаемость и найдите поле Метаописание главной страницы:

В разделе «Метаописание главной страницы» вы можете ввести описание и проконтролировать количество использованных символов.

Обратите внимание, что длина текста на странице результатов поиска ограничена 160 символами.

Метаописание записи и страницы

Обычно поисковые системы сохраняют содержимое записи или страницы и используют его в качестве описания на странице результатов поиска.

Вы можете нестандартно настроить своё метаописание, чтобы оно привлекало внимание читателя и могло повысить рейтинг записи или страницы на поисковой странице.

Чтобы настроить описание, щёлкните значок Jetpack (в виде молнии) в правом верхнем углу экрана редактора. Затем введите нужное описание в поле Описание возможностей поисковой оптимизации:

Снимок экрана настроек описания возможностей поисковой оптимизации, показывающий, что описание находится в разделе «Предварительный просмотр публикаций в социальных сетях» в параметрах блока.

С помощью функции «Описание возможностей поисковой оптимизации» в Jetpack добавьте на страницу или в запись пользовательское описание возможностей поисковой оптимизации.

Описание изменится во всех поисковых системах в течение нескольких часов после сохранения записи или страницы. Тем не менее поисковые системы могут отображать описание, взятое непосредственно из содержимого, если они сочтут его более точным, чем пользовательское описание возможностей поисковой оптимизации. Описание, используемое для страницы или записи, может даже отличаться в зависимости от поискового запроса.

Структура заголовков страниц

С помощью структуры заголовков страниц можно определить, как ваше содержимое будет отображаться в результатах поиска и на сайтах социальных сетей, когда вы ищете своё содержимое или делитесь ссылками на него.

Результаты поиска для WordPress.com, в которых отображаются название сайта, разделитель и ключевая фраза.

На изображении выше мы видим название сайта (WordPress.com), разделитель (:) и ключевую фразу (Fast, Secure Managed WordPress Hosting — быстрый и надежный управляемый хостинг WordPress).

Вы можете изменять порядок отображения элементов в заголовках и добавлять пользовательские разделители между ними.

Для доступа к редактору Структура заголовков страниц выполните следующие действия.

  1. В консоли перейдите в раздел Инструменты → Маркетинг → Посещаемость.
  2. Прокрутите страницу вниз и найдите раздел Структура заголовков страниц.
  3. Используйте доступные кнопки, например Заголовок сайта, Ключевая фраза, Заголовок записи и т. п., для соответствующих типов содержимого. Выбранные элементы будут автоматически назначены для предварительного просмотра, когда кто-то делится вашим содержимым или ищет его. Не вводите пользовательский текст в этом разделе, если не желаете, чтобы он отображался для всех ваших записей, страниц или другого выбранного типа содержимого.
  4. Щёлкните поле и введите свои собственные разделители (символы) между элементами, например двоеточие [:], косую черту [/], дефис [], тильду [~] и т. д.
  5. При необходимости элементы можно удалять с помощью клавиш Delete или Backspace.
  6. Нажмите кнопку Сохранить настройки для сохранения изменений.

Использование инструментов поисковой оптимизации WordPress.com для настройки пользовательской структуры для заголовков записей.

Предварительный просмотр публикаций в социальных сетях

С помощью функции Предварительный просмотр в социальных сетях перед публикацией записи или страницы можно узнать, как она будет выглядеть на странице результатов поиска и в социальных сетях.

Для этого в правом верхнем углу окна редактора щёлкните значок Jetpack (в виде молнии) и найдите раздел Предварительный просмотр в социальных сетях. Нажмите кнопку Предпросмотр, чтобы открыть модальное окно Предварительный просмотр в социальных сетях.

В верхнем правом углу редактора щёлкните значок Jetpack, чтобы открыть модальное окно «Предварительный просмотр в социальных сетях». Щёлкните заголовок «Предварительный просмотр в социальных сетях», а затем кнопку с надписью «Предварительный просмотр»
Предварительный просмотр в социальных сетях на боковой панели Jetpack. Щёлкните «Предварительный просмотр в социальных сетях», а затем — «Предварительный просмотр».

Функция Предварительный просмотр в социальных сетях использует данные, указанные как метаописание. Таким образом, вы узнаете, как ваша запись будет выглядеть в Google Поиске, на Facebook и в Twitter.

Карточка Twitter как пример предварительного просмотра в социальных сетях. В предварительный просмотр записи включены следующие элементы: избранное изображение, заголовок, цитата и ссылка.
В модальном окне предварительного просмотра в социальных сетях показано, как выглядит запись в Twitter.

  • 1.
    Зачем добавлять мета-теги в WordPress?

  • 2.
    Установка Yoast SEO для добавления meta-тегов

  • 3.
    Как добавить мета-теги на страницу/запись WordPress

  • 4.
    Как добавить мета-тег в код главной страницы своего сайта WordPress

  • 5.
    Как добавить мета-теги на страницы архивов категорий WordPress

Как добавить мета-теги в WordPress для лучшей SEO оптимизации сайта? Такие мета теги, как Title, Descriptions используются поисковыми системами для ранжирования страниц и статей. В этой статье мы покажем, как правильно добавить мета-теги на главную страницу и внутренние страницы сайта.

Мета теги Title, Descriptions позволяют поисковым системам более точно определить тему статьи и ранжировать её.

Title – это заголовок вашей страницы (может отличаться от H1). Заголовок страницы, который выводится первой (после URL в Google) строчкой в сниппете. Наличие ключевого слова в нем – обязательно.

Descriptions – описание страницы. Важно заполнять описание страницы, так как оно выводится в сниппете под title. Качественно составленное описание страницы не только улучшает ваши SEO показатели, но и увеличивает CTR страницы, если описание заинтересует пользователя.

Многие могут вспомнить мета-тег Keywords. Как пишет Яндекс в своей документации, Keywords может учитываться при определении соответствия страницы поисковым запросам. Google заявил, что не учитывает этот мета-тег и рекомендует веб-мастерам не тратить на него время. Bing и Yahoo также сообщили, что не учитывают данный мета-тег в выдаче.

Как добавить мета-теги в WordPress - png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=

Мета-теги являются HTML-тегами и находятся в Header вашего сайта. SEO плагины WordPress позволяют легко добавить мета-теги на страницы вашего сайта.

Добавить мета-тег Keywords с помощью Yoast SEO больше нельзя, начиная с версии 6.3.

Установка Yoast SEO для добавления meta-тегов

Если вы ещё не установили на свой сайт Yoast SEO, то воспользуйтесь нашей инструкцией по установке плагинов WordPress.

После установки у вас сразу же будет доступна возможность прописывать мета-теги для сайта WordPress, а также заполнить Open Graph для социальных сетей.

В ранних версиях нужно было зайти в основные настройки плагина и включить возможность заполнения мета-тегов, но сейчас эта опция включена “из коробки”, поэтому останавливаться на этом мы не будем.

Как добавить мета-теги на страницу/запись WordPress

Зайдите на страницу или запись, к который вы хотите добавить title, descriptions, keywords.

Прокрутите вниз страницы до окна Yoast SEO. Вы увидите следующее окно:

Как добавить мета-теги в WordPress - png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=

Вы видите SEO настройки страницы. В поле “Фокусное ключевое слово” вписывается то ключевое слово, под которое заточена статья. Не нужно путать это поле с заполнением мета-теги Keywords.

Ниже вы видите, как выглядит на данный момент сниппет в мобильной версии поиска Google. Вы также можете выбрать показ сниппета в результатах поиска на ПК.

Нажмите кнопку “Изменить сниппет”, чтобы заполнить title (заголовок) и description (описание).

Как добавить мета-теги в WordPress - png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=

Для изменения нам доступны следующие мета-теги в WordPress:

  • SEO-заголовок – Title;
  • Мета-описание – description.

По умолчанию SEO-заголовок страницы формируется по шаблону. Данный шаблон идет по умолчанию, но его можно изменить в настройках сайта. Также вы можете стереть его и вписать свой.

Ярлык или же URL записи старайтесь делать как можно короче и вписывайте в него основную ключевую фразу.

Мета-описание страницы можно также формировать по шаблону, но это лучше делать для шаблонных, однотипных страниц. Для статей и страниц для каждой страницы нужно писать своё уникальное описание. Постарайтесь заинтересовать человека, ведь кроме как с помощью заголовка и описания вы никак не выделяетесь в выдаче. Используйте ключевые фразы.

Как добавить мета-теги в WordPress - png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=

Вы можете заметить, что под SEO-заголовком и Мета-описанием есть полоса, которая в зависимости от размера текста окрашивается в разные цвета. Старайтесь максимально заполнить данную строку, но оставаться в зеленой зоне.

Благодаря заполнению фокусного ключевого слова мы видим, как Google будет выделять слова в нашем сниппете при поиске.

Таким образом мы смогли добавить в код страницы/записи мета-теги в WordPress. Обновите страницу, чтобы сохранить изменения.

Как добавить мета-тег в код главной страницы своего сайта WordPress

SEO-оптимизация главной страницы является важной частью продвижения сайта, ведь на главная страница часто продвигается под высококонкурентные запросы.

Чтобы добавить мета-теги на главную страницу в WordPress, перейдите в раздел SEO -> Отображение в поисковой выдаче -> Общие. Здесь вы видите привычные поля для заполнения мета-тегов для главной страницы.

Как добавить мета-теги в WordPress - png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=

Не забудьте сохранить изменения, чтобы мета-теги появились на главной странице WordPress.

Если для главной страницы и для страницы блога (вывода статей) вы используете разные страницы, то на данной страницы вы увидите следующий текст:

Как добавить мета-теги в WordPress - png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=

Данные сообщения означают, что у на роль главной страницы назначена не страница с последними статьями, а созданная вручную страница. Нажмите на ссылку в конце предложения и вас перенаправит на редактирование главной страницы. Там вы сможете заполнить мета-теги WordPress, как мы рассказывали выше в разделе добавления мета-тегов для страниц/записей.

Как добавить мета-теги на страницы архивов категорий WordPress

SEO-оптимизация страницы категорий (Рубрик) позволит более эффективно продвигать сайт, если человек ищет много статей по одной теме.

Зайдите в раздел Записи -> Рубрики, далее нажмите изменить у той категории, для который вы хотите написать мета-теги.

Как добавить мета-теги в WordPress - png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=

Откроется страница редактирования категорий. Прокрутите вниз до окна Yoast SEO.

Как добавить мета-теги в WordPress - png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=

Как вы видите, это точно такое же окно, как и при редактировании страниц, поэтому нажмите “Изменить сниппет” и заполните SEO-заголовок и Мета-описание.

Не забудьте сохранить изменения.

Таким же способом вы можете заполнять мета-данные для других категорий и тэгов.

Мы надеемся, что данная статья помогла вам понять, как добавить мета-теги в WordPress с помощью Yoast SEO. Если у вас появятся вопросы, пишите их в комментарии, мы всегда рады помочь!

Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.

Мета-теги

Многие владельцы сайтов на WordPress после добавления ресурса на Яндекс.Вебмастер встречают сообщение — «Отсутствуют мета-теги <description>». А это не очень хорошо сказывается на индексации. Разработчики знают об этой проблеме, но ничего предпринимают, ссылаясь на то, что мета-теги устарели, но нам в любом случае приходится придерживаться рекомендаций поисковых систем.

Нет мета-тегов

Существует несколько способов решения этого требования

Первый, — правка исходного кода CMS, но на это у многих не хватает опыта, и к тому же после обновления системы измененные файлы могут быть заменены на оригинальные.

Второй, — установка плагина. Конечно, установка дополнительных плагинов замедляет работу системы, в плагинах находят уязвимости, возрастает нагрузка на сервер и так далее, но это самый простой путь.

Для примера я взял плагин Easy WP Meta Description. У нас наиболее популярен плагин All in One SEO Pack. Зачастую в настройках плагина включают автоматическое формирование мета тегов (описания страницы), но любой вебмастер скажет, что для правильного формирования тегов нужен как минимум искусственный интеллект.

Установка плагина происходит точно так же, как и остальных, далее его нужно активировать.

Никаких настроек у плагина нет, что даже к лучшему, поскольку плагин ничего будет формировать без нашего ведома.

Открываем страницу материала, под окном редактора появилось еще одно окно — Easy WP Meta Description.

Easy WP Meta Description

В это окно и нужно прописать мета-теги, но прописать их нужно правильно, чтобы воспринимали поисковики.

Так описание не рекомендуется делать более 250 символов, причем «ударными» являются первые 150. Описание не должно дублировать заголовок (желательно), а для описания рекомендую заглянуть в «подбор слов» от Яндекс Директ — https://wordstat.yandex.ru/

Пример, вроде похожие сочетания прогноз астрологов и астрологический прогноз, но первому словосочетанию всего 4 700 запросов в месяц, а по второму уже более 50 000.

Яндекс Вордстат

Также желательно сделать заголовок удобочитаемым и понятным, не стараясь «напихать» в него как можно больше ключевых слов, например – Персональный астрологический прогноз на 2018 год от Ивана Ивановича.

Не забудьте проделать то же самое с главной страницей и категориями, если они есть.

Если вернутся к автоматическому созданию мета-тегов, плагин, скорее всего, возьмет кусок текста, который не будет нести никакого смысла.

Также WordPress «из коробки» не поддерживает ключевые слова, это решается также установкой плагина, можно выбрать уже упоминавшийся All in One либо Meta Keywords Generator, решать вам. Установка плагина и работа с плагином практически не отличается от описанного выше.

Данный материал ни в коем случае не является каким-либо руководством по продвижению сайта, он предназначен для тех, кто решил заниматься своим сайтом самостоятельно (сейчас таких все больше), но не знает, с чего начать. А начинать нужно с того, чтобы в кабинете вебмастера у поисковой системы было как можно меньше претензий к вашему сайту.

Есть много плагинов для SEO, но почти у всех из них главная задача — это создать SEO мета-теги (метаданные) для страницы: title, description, robots, Open Graph. Иногда есть смысл не подключать подобные плагины, а использовать свой небольшой код — с ним проще управляться и решать нестандартные задачи… В этой статье я делюсь своим «велосипедом» в этой области.

Код ниже был написан уже давно, для статьи: Сравнение СЕО плагинов platinum SEO Pack и All in One SEO Pack. И, несмотря на то что есть плагины, то и дело появляется необходимость пользоваться этим кодом. Он используется иногда, как альтернатива, и судя по комментариям это бывает нужно не только мне. Поэтому было принято стратегическое решение smile вынести этот код в отдельную статью и поддерживать его уже здесь.

Одно из преимуществ этого кода над плагинами — понятность и максимальная простота. Все делается через хуки и тут и в плагинах, только найти нужных хук в плагине обычно занимает больше времени. Кроме того вы можете переписать часть кода под свою конкретную задачу.

Если вы не разбираетесь в PHP, то настоятельно рекомендую использовать SEO плагины — это гораздо удобнее! Впрочем, иногда плагины удобнее и для тех, кто знает PHP, я допустим не всегда юзаю этот код, и плагинами вроде SEO Yoast не брезгую.

Код вывода title, description, robots, Open Graph, twitter

Базовая задача SEO плагинов — это дать возможность создавать четыре метаполя для страницы: title, description, robots и keywords. А также создание дополнительных Open Graph данных.

Код, который все это реализует (см. комментарии в коде):

GitHub

<?php

/**
 * Simple SEO class for WordPress to create page metatags:
 * title, description, robots, keywords, Open Graph.
 *
 * IMPORTANT! Since version 1.7.0 robots code logic was chenged. Changed your code after update!
 * IMPORTANT! Since version 1.8.0 title code logic was chenged. Changed your code after update!
 *
 * @see https://github.com/doiftrue/Kama_SEO_Tags
 *
 * @author Kama
 *
 * @version 1.9.11
 */
class Kama_SEO_Tags {

	static function init(){

		// force WP document_title function to run
		add_theme_support( 'title-tag' );
		add_filter( 'pre_get_document_title', [ __CLASS__, 'meta_title' ], 1 );

		add_action( 'wp_head', [ __CLASS__, 'meta_description' ], 1 );
		add_action( 'wp_head', [ __CLASS__, 'meta_keywords' ], 1 );
		add_action( 'wp_head', [ __CLASS__, 'og_meta' ], 1 ); // Open Graph, twitter данные

		// WP 5.7+
		add_filter( 'wp_robots', [ __CLASS__, 'wp_robots_callback' ], 11 );
	}

	/**
	 * Open Graph, twitter data in `<head>`.
	 *
	 * @See Documentation: http://ogp.me/
	 */
	static function og_meta(){

		$obj = get_queried_object();

		if( isset( $obj->post_type ) )   $post = $obj;
		elseif( isset( $obj->term_id ) ) $term = $obj;

		$is_post = isset( $post );
		$is_term = isset( $term );

		$title = self::meta_title();
		$desc = preg_replace( '/^.+content="([^"]*)".*$/s', '$1', self::meta_description() );

		// Open Graph
		$els = [];
		$els['og:locale']      = get_locale();
		$els['og:site_name']   = get_bloginfo('name');
		$els['og:title']       = $title;
		$els['og:description'] = $desc;
		$els['og:type']        = is_singular() ? 'article' : 'object';

		// og:url
		if( 'url' ){

			if( $is_post ) $url = get_permalink( $post );
			if( $is_term ) $url = get_term_link( $term );

			if( ! empty( $url ) ){

				$els['og:url'] = $url;

				// relative (not allowed)
				if( '/' === $url[0] ){

					// without protocol only: //domain.com/path
					if( substr( $url, 0, 2 ) === '//' ){
						$els['og:url'] = set_url_scheme( $url );
					}
					// without domain
					else{
						$parts = wp_parse_url( $url );
						$els['og:url'] = home_url( $parts['path'] ) . ( isset( $parts['query'] ) ? "?{$parts['query']}" : '' );
					}
				}

			}
		}

		/**
		 * Allow to disable `article:section` property.
		 *
		 * @param bool $is_on
		 */
		if( apply_filters( 'kama_og_meta_show_article_section', true ) && is_singular() ){
			$post_taxname = get_object_taxonomies( $post->post_type );

			if( $post_taxname ){

				$post_terms = get_the_terms( $post, reset( $post_taxname ) );
				if( $post_terms && $post_term = array_shift( $post_terms ) ){
					$els['article:section'] = $post_term->name;
				}
			}
		}

		// og:image
		if( 'image' ){

			/**
			 * Allow to change `og:image` `og:image:width` `og:image:height` values.
			 *
			 * @param int|string|array|WP_Post  $image_data  WP attachment ID or Image URL or Array [ image_url, width, height ].
			 */
			$image = apply_filters( 'pre_kama_og_meta_image', null );

			if( ! $image ){

				$attach_id_from_text__fn = static function( $text ){

					if(
						preg_match( '/<img +src *= *['"]([^'"]+)['"]/', $text, $mm )
						&&
						( '/' === $mm[1][0] || strpos($mm[1], $_SERVER['HTTP_HOST']) )
					){
						$name = basename( $mm[1] );
						$name = preg_replace( '~-[0-9]+x[0-9]+(?=..{2,6})~', '', $name ); // удалим размер (-80x80)
						$name = preg_replace( '~.[^.]+$~', '', $name );                   // удалим расширение
						$name = sanitize_title( sanitize_file_name( $name ) );

						global $wpdb;
						$attach_id = $wpdb->get_var( $wpdb->prepare(
							"SELECT ID FROM $wpdb->posts WHERE post_name = %s AND post_type = 'attachment'", $name
						) );

						return (int) $attach_id;
					}

					return 0;
				};

				if( $is_post ){

					$image = get_post_thumbnail_id( $post );

					if( ! $image ){

						/**
						 * Allows to turn off the image search in post content.
						 *
						 * @param bool $is_on
						 */
						if( apply_filters( 'kama_og_meta_thumb_id_find_in_content', true ) ){

							$image = $attach_id_from_text__fn( $post->post_content );

							// первое вложение поста
							if( ! $image ) {

								$attach = get_children( [
									'numberposts'    => 1,
									'post_mime_type' => 'image',
									'post_type'      => 'attachment',
									'post_parent'    => $post->ID,
								] );

								if( $attach && $attach = array_shift( $attach ) ){
									$image = $attach->ID;
								}
							}
						}
					}
				}
				elseif( $is_term ){

					$image = get_term_meta( $term->term_id, '_thumbnail_id', 1 );

					if( ! $image )
						$image = $attach_id_from_text__fn( $term->description );
				}

				/**
				 * Allow to set `og:image` `og:image:width` `og:image:height` values if it's not.
				 *
				 * @param int|string|array|WP_Post  $image  WP attachment ID or Image URL or [ image_url, width, height ] array.
				 */
				$image = apply_filters( 'kama_og_meta_image', $image );
				$image = apply_filters( 'kama_og_meta_thumb_id', $image ); // backcompat
			}

			if( $image ){

				if(
					$image instanceof WP_Post
					||
					( is_numeric( $image ) && $image = get_post( $image ) )
				){

					// full size
					[
						$els['og:image[1]'],
						$els['og:image[1]:width'],
						$els['og:image[1]:height'],
						$els['og:image[1]:alt'],
						$els['og:image[1]:type']
					] = array_merge(
						array_slice( image_downsize( $image->ID, 'full' ), 0, 3 ),
						[ $image->post_excerpt, $image->post_mime_type ]
					);

					if( ! $els['og:image[1]:alt'] ){
						unset( $els['og:image[1]:alt'] );
					}

					// thumbnail size
					[
						$els['og:image[2]'],
						$els['og:image[2]:width'],
						$els['og:image[2]:height']
					] = array_slice( image_downsize( $image->ID, 'thumbnail' ), 0, 3 );
				}
				elseif( is_array( $image ) ){
					[
						$els['og:image[1]'],
						$els['og:image[1]:width'],
						$els['og:image[1]:height']
					] = $image;
				}
				else{
					$els['og:image[1]'] = $image;
				}

			}

		}

		// twitter
		$els['twitter:card'] = 'summary';
		$els['twitter:title'] = $els['og:title'];
		$els['twitter:description'] = $els['og:description'];
		if( ! empty( $els['og:image[1]'] ) ){
			$els['twitter:image'] = $els['og:image[1]'];
		}

		/**
		 * Allows change values of og / twitter meta properties.
		 *
		 * @param array  $els
		 */
		$els = apply_filters( 'kama_og_meta_elements_values', $els );
		$els = array_filter( $els );
		ksort( $els );

		// make <meta> tags
		$metas = [];
		foreach( $els as $key => $val ){

			// og:image[1] > og:image  ||  og:image[1]:width > og:image:width
			$fixed_key = preg_replace( '/[d]/', '', $key );

			if( 0 === strpos( $key, 'twitter:' ) )
				$metas[] = '<meta name="' . $fixed_key . '" content="' . esc_attr( $val ) . '" />';
			else
				$metas[] = '<meta property="' . $fixed_key . '" content="' . esc_attr( $val ) . '" />';
		}

		/**
		 * Filter resulting properties. Allows to add or remove any og/twitter properties.
		 *
		 * @param array  $els
		 */
		$metas = apply_filters( 'kama_og_meta_elements', $metas, $els );

		echo "nn". implode( "n", $metas ) ."nn";
	}

	/**
	 * Generate string to show as document title.
	 *
	 * For posts and taxonomies specific title can be specified as metadata with name `title`.	 *
	 *
	 * @param string $title `pre_get_document_title` passed value.
	 *
	 * @return string
	 */
	static function meta_title( $title = '' ){
		global $post;

		// support for `pre_get_document_title` hook.
		if( $title )
			return $title;

		static $cache; if( $cache ) return $cache;

		$l10n = apply_filters( 'kama_meta_title_l10n', [
			'404'     => 'Ошибка 404: такой страницы не существует',
			'search'  => 'Результаты поиска по запросу: %s',
			'compage' => 'Комментарии %s',
			'author'  => 'Статьи автора: %s',
			'archive' => 'Архив за',
			'paged'   => 'Страница %d',
		] );

		$parts = [
			'prev'  => '',
			'title' => '',
			'page'  => '',
			'after' => '',
		];

		// 404
		if( is_404() ){
			$parts['title'] = $l10n['404'];
		}
		// search
		elseif( is_search() ){
			$parts['title'] = sprintf( $l10n['search'], get_query_var( 's' ) );
		}
		// front_page
		elseif( is_front_page() ){

			if( is_page() && $parts['title'] = get_post_meta( $post->ID, 'title', 1 ) ){
				// $parts['title'] defined
			}
			else {
				$parts['title'] = get_bloginfo( 'name', 'display' );
				$parts['after'] = '{{description}}';
			}
		}
		// singular
		elseif( is_singular() || ( is_home() && ! is_front_page() ) || ( is_page() && ! is_front_page() ) ){

			$parts['title'] = get_post_meta( $post->ID, 'title', 1 );

			if( ! $parts['title'] ){
				/**
				 * Allow to set meta title for singular type page, before the default title will be taken.
				 *
				 * @param string  $title
				 * @param WP_Post $post
				 */
				$parts['title'] = apply_filters( 'kama_meta_title_singular', '', $post );
			}

			if( ! $parts['title'] ){
				$parts['title'] = single_post_title( '', 0 );
			}

			if( $cpage = get_query_var( 'cpage' ) ){
				$parts['prev'] = sprintf( $l10n['compage'], $cpage );
			}
		}
		// post_type_archive
		elseif( is_post_type_archive() ){
			$parts['title'] = post_type_archive_title('', 0 );
			$parts['after'] = '{{blog_name}}';
		}
		// taxonomy
		elseif( is_category() || is_tag() || is_tax() ){
			$term = get_queried_object();

			$parts['title'] = $term ? get_term_meta( $term->term_id, 'title', 1 ) : '';

			if( ! $parts['title'] ){
				$parts['title'] = single_term_title('', 0 );

				if( is_tax() ){
					$parts['prev'] = get_taxonomy( $term->taxonomy )->labels->name;
				}
			}

			$parts['after'] = '{{blog_name}}';
		}
		// author posts archive
		elseif( is_author() ){
			$parts['title'] = sprintf( $l10n['author'], get_queried_object()->display_name );
			$parts['after'] = '{{blog_name}}';
		}
		// date archive
		elseif( ( get_locale() === 'ru_RU' ) && ( is_day() || is_month() || is_year() ) ){
			$rus_month = [
				'', 'январь', 'февраль', 'март', 'апрель', 'май', 'июнь',
				'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'
			];
			$rus_month2 = [
				'', 'января', 'февраля', 'марта', 'апреля', 'мая', 'июня',
				'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'
			];
			$year     = get_query_var('year');
			$monthnum = get_query_var('monthnum');
			$day      = get_query_var('day');

			if( is_year() )      $dat = "$year год";
			elseif( is_month() ) $dat = "{$rus_month[ $monthnum ]} $year года";
			elseif( is_day() )   $dat = "$day {$rus_month2[ $monthnum ]} $year года";

			$parts['title'] = sprintf( $l10n['archive'], $dat );
			$parts['after'] = '{{blog_name}}';
		}
		// other archives
		else {
			$parts['title'] = get_the_archive_title();
			$parts['after'] = '{{blog_name}}';
		}

		// pagination
		$pagenum = get_query_var( 'paged' ) ?: get_query_var( 'page' );
		if( $pagenum && ! is_404() ){
			$parts['page'] = sprintf( $l10n['paged'], $pagenum );
		}

		/**
		 * Allows to change parts of the document title.
		 *
		 * @param array $parts Title parts. It then will be joined.
		 * @param array $l10n  Localisation strings.
		 */
		$parts = apply_filters( 'kama_meta_title_parts', $parts, $l10n );

		/** This filter is documented in wp-includes/general-template.php */
		$parts = apply_filters( 'document_title_parts', $parts );

		// handle placeholders
		if( '{{blog_name}}' === $parts['after'] ){
			$parts['after'] = get_bloginfo( 'name', 'display' );
		}
		elseif( '{{description}}' === $parts['after'] ){
			$parts['after'] = get_bloginfo( 'description', 'display' );
		}

		/** This filter is documented in wp-includes/general-template.php */
		$sep = apply_filters( 'document_title_separator', ' – ' );

		$title = implode( ' '. trim( $sep ) .' ', array_filter( $parts ) );

		//$title = wptexturize( $title );
		//$title = convert_chars( $title );
		$title = esc_html( $title );
		$title = capital_P_dangit( $title );

		return $cache = $title;
	}

	/**
	 * Display `description` metatag.
	 *
	 * Must be used on hook `wp_head`.
	 *
	 * Use `description` meta-field to set description for any posts.
	 * It also work for page setted as front page.
	 *
	 * Use `meta_description` meta-field to set description for any terms.
	 * Or use default `description` field of a term.
	 *
	 * @return string Description.
	 */
	static function meta_description(){
		global $post;

		// called from `wp_head` hook
		$echo_result = ( func_num_args() === 1 );

		static $cache = null;
		if( isset( $cache ) ){

			if( $echo_result )
				echo $cache;

			return $cache;
		}

		$desc = '';
		$need_cut = true;

		// front
		if( is_front_page() ){

			// когда для главной установлена страница
			if( is_page() ){
				$desc = get_post_meta( $post->ID, 'description', true );
				$need_cut = false;
			}

			if( ! $desc ){

				/**
				 * Allow to change front_page meta description.
				 *
				 * @param string $home_description
				 */
				$desc = apply_filters( 'home_meta_description', get_bloginfo( 'description', 'display' ) );
			}
		}
		// any post
		elseif( is_singular() ){

			if( $desc = get_post_meta( $post->ID, 'description', true ) ){
				$need_cut = false;
			}

			if( ! $desc ){
				$desc = $post->post_excerpt ?: $post->post_content;
			}

			$desc = trim( strip_tags( $desc ) );
		}
		// any term (taxonomy element)
		elseif( ( $term = get_queried_object() ) && ! empty( $term->term_id ) ){

			$desc = get_term_meta( $term->term_id, 'meta_description', true );

			if( ! $desc )
				$desc = get_term_meta( $term->term_id, 'description', true );

			$need_cut = false;
			if( ! $desc && $term->description ){
				$desc = strip_tags( $term->description );
				$need_cut = true;
			}
		}

		$desc = str_replace( [ "n", "r" ], ' ', $desc );

		// remove shortcodes, but leave markdown [foo](URL)
		$desc = preg_replace( '~[[^]]+](?!()~', '', $desc );

		/**
		 * Allow change or set the meta description.
		 *
		 * @param string $desc        Current description.
		 * @param string $origin_desc Description before cut.
		 * @param bool   $need_cut    Is need to cut?
		 * @param int    $maxchar     How many characters leave after cut.
		 */
		$desc = apply_filters( 'kama_meta_description', $desc );

		/**
		 * Allow to specify is the meta description need to be cutted.
		 *
		 * @param bool $need_cut
		 */
		$need_cut = apply_filters( 'kama_meta_description__need_cut', $need_cut );

		if( $need_cut ){

			/**
			 * Allow set max length of the meta description.
			 *
			 * @param int $maxchar
			 */
			$maxchar = apply_filters( 'kama_meta_description__maxchar', 260 );

			$char = mb_strlen( $desc );

			if( $char > $maxchar ){
				$desc = mb_substr( $desc, 0, $maxchar );
				$words = explode( ' ', $desc );
				$maxwords = count( $words ) - 1; // remove last word, it incomplete in 90% cases
				$desc = implode( ' ', array_slice( $words, 0, $maxwords ) ) . ' ...';
			}
		}

		// remove multi-space
		$desc = preg_replace( '/s+/s', ' ', $desc );

		$cache = $desc
			? sprintf( "<meta name="description" content="%s" />n", esc_attr( trim( $desc ) ) )
			: '';

		if( $echo_result )
			echo $cache;

		return $cache;
	}

	/**
	 * Wrpper for WP Robots API introduced in WP 5.7+.
	 *
	 * Must be used on hook `wp_robots`.
	 *
	 * @param array $robots
	 */
	static function wp_robots_callback( $robots ){

		if( is_singular() ){
			$robots_str = get_post_meta( get_queried_object_id(), 'robots', true );
		}
		elseif( is_tax() || is_category() || is_tag() ){
			$robots_str = get_term_meta( get_queried_object_id(), 'robots', true );
		}

		if( ! empty( $robots_str ) ){

			// split by spece or comma
			$robots_parts = preg_split( '/(?<!:)[s,]+/', $robots_str, -1, PREG_SPLIT_NO_EMPTY );

			foreach( $robots_parts as $directive ){

				// for max-snippet:2
				if( strpos( $directive, ':' ) ){
					[ $key, $value ] = explode( ':', $directive );
					$robots[ $key ] = $value;
				}
				else {
					$robots[ $directive ] = true;
				}
			}
		}

		if( ! empty( $robots['none'] ) || ! empty( $robots['noindex'] ) ){
			unset( $robots['max-image-preview'] );
		}

		return $robots;
	}

	/**
	 * Generate `<meta name="keywords">` meta-tag fore <head> part of the page.
	 *
	 * To set Your own keywords for post, create meta-field with key `keywords`
	 * and set the keyword to the value.
	 *
	 * Default keyword for a post generates from post tags nemes and categories names.
	 * If the `keywords` meta-field is not specified.
	 *
	 * You can specify the keywords for the any taxonomy element (term) using shortcode
	 * `[keywords=word1, word2, word3]` in the description field.
	 *
	 * @param string $home_keywords Keywords for home page. Ex: 'word1, word2, word3'
	 * @param string $def_keywords  сквозные ключевые слова - укажем и они будут прибавляться
	 *                              к остальным на всех страницах.
	 */
	static function meta_keywords( $home_keywords = '', $def_keywords = '' ){
		global $post;

		$out = [];

		if( is_front_page() ){
			$out[] = $home_keywords;
		}
		elseif( is_singular() ){

			$meta_keywords = get_post_meta( $post->ID, 'keywords', true );

			if( $meta_keywords ){
				$out[] = $meta_keywords;
			}
			elseif( $post->post_type === 'post' ){

				$res = wp_get_object_terms( $post->ID, [ 'post_tag', 'category' ], [ 'orderby' => 'none' ] );

				if( $res && ! is_wp_error( $res ) ){
					foreach( $res as $tag ){
						$out[] = $tag->name;
					}
				}
			}

		}
		elseif( is_category() || is_tag() || is_tax() ){
			$term = get_queried_object();

			// wp 4.4
			if( function_exists( 'get_term_meta' ) && $term ){
				$out[] = get_term_meta( $term->term_id, 'keywords', true );
			}
			else{
				preg_match( '![keywords=([^]]+)]!iU', $term->description, $match );
				$out[] = isset( $match[1] ) ? trim( $match[1] ) : '';
			}
		}

		if( $def_keywords ){
			$out[] = $def_keywords;
		}

		/**
		 * Allow to change resulting string of meta_keywords() method.
		 *
		 * @param string $out
		 */
		$out = apply_filters( 'kama_meta_keywords', implode( ', ', $out ) );

		echo $out
			? '<meta name="keywords" content="'. esc_attr( $out ) .'" />' . "n"
			: '';
	}

}

Теперь нужно подключить и запустить код

Для этого создайте файл Kama_SEO_Tags.php в корне темы (или где-то еще) и скопируйте в него php код (который выше). Подключите этот файл в файле темы functions.php.

require_once __DIR__ . '/Kama_SEO_Tags.php';

Kama_SEO_Tags::init();

Это все.

Если код не работает, то нужно убедиться используется ли функция wp_head() в файле темы header.php и не выводится ли там жестко тег <title> и другие SEO теги.

Метаполя в админке

Код выше только выводит нужные SEO мета-теги, но не добавляет метаполя для записей или элементов таксономий — их нужно создать отдельно.

На странице редактирования записи или термина вам нужно создать метабокс с мета-полями:

  • title — альтернативный SEO заголовок будет использоваться в мета-теги <title>, вместо заголовка записи.

  • description — описание для страницы. Если его нет, то будет взять текст из цитаты, если и его нет, то кусок из начала контента записи.

    meta_description — так должно называться метаполе описания для терминов, потому что ключ description для таксономий занят…

  • keywords — метатег keywords. Не знаю нужен он или нет в современных реалиях.

  • robots — указанное тут значение выводится как есть, например noindex,nofollow.
Как создать метабоксы с метаполями?

Сделать это можно разными способами, например с помощью:

  • Моего класса Kama_Post_Meta_Box.

  • просто кодом.
    Для элементов таксономий (терминов), используйте пример из хука (taxonomy)_edit_form_fields.

  • C помощью плагинов ACF, Carbon Fields, Meta Box.

Настройка (использование хуков)

Код содержит хуки, чтобы полностью или частично изменить вывод каждого метаполя.

Рассмотрим некоторые хуки, которые могут пригодится:

Open Graph

// disable `article:section` property.
add_filter( 'kama_og_meta_show_article_section', '__return_false' );
// turn off the image search in post content.
add_filter( 'kama_og_meta_thumb_id_find_in_content', '__return_false' );
// set `og:image` `og:image:width` `og:image:height` values if it's not.
add_filter( 'kama_og_meta_image', function( $image ){

	// $image = WP attachment ID or Image URL or [ image_url, width, height ] array.

	if( ! $image ){
		// постер сайта
		$image = [ wp_get_attachment_image_url( 125, 'full' ), 350, 350 ];
	}

	return $image;
} );

Title

Разделитель в заголовке меняется через родной ВП хук document_title_separator:

// изменим разделитель для title
add_filter( 'document_title_separator', fn() => ' - ' );

Description

Описание для главной страницы

// изменим описание для главной страницы
add_filter( 'home_meta_description', fn() => 'Описание для главной' );
// изменим описание
add_filter( 'kama_meta_description', 'change_meta_description' );
function change_meta_description( $desc ){

	return $desc;
}

Robots

# robots metatag.
add_filter( 'wp_robots', 'wp_kama_robots_tag' );

function wp_kama_robots_tag( $robots ){

	// close
	if(
		is_attachment() ||
		is_paged() ||
		is_post_type_archive()
	){
		$robots['noindex'] = true;
		$robots['follow'] = true;
	}

	// close taxonomies

	// close draft
	if( is_preview() ){
		$robots['none'] = true;
	}

	return $robots;
}
Полезные ссылки
  • Анализ заголовка title

Languages:
English •
Русский

(Add your language)

Contents

  • 1 Что такое Мета Тэги?
    • 1.1 Почему Мета-теги пропали ?
    • 1.2 Являются ли мета-теги необходимыми?
  • 2 Putting Meta Tags Back In
    • 2.1 Generic Meta Tags
    • 2.2 Using Meta Tag Plugins
  • 3 Meta Tag Resources

Когда поисковик исследует ваш сайт, он собирает информацию из названия, заголовки, содержания и мета-тегов, таких как описание или ключевые слова. Он сравнивает слова в каждом из этих разделов и «котировка» сайта зависит от того, насколько хорошо информация совпадает. У нас есть больше информации о том, как максимально полно использовать мета теги ниже.

Важно, чтобы разработчики веб-сайтов поняли, что «‘установка по умолчанию WordPress не содержат описание и ключевые слова данных мета-тегов «‘. Мета теги могут быть добавлены вручную, путем внесения изменений в файлы шаблонов Темы , или с помощью Плагинов WordPress..

Что такое Мета Тэги?

Слово » meta » означает «информация о». «»Мета Теги» » были созданы изначально для предоставления краткой информации о сайте. Мета-теги перечисляют информацию о веб-странице, такую как автор, ключевые слова, описание, тип документа, авторские права и другие основные сведения.

Это пример мета-тега description («описание»):

<meta name="description" content="Это
описание фразы или короткий параграф о
статье или записи (посте)." />

Наиболее распространёные мета теги. Примеры :

<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="harrietsmith@harrietsmith.us" />
<meta name="copyright" content="Copyright (c)1997-2004 
Harriet Smith. All Rights Reserved." />
<meta name="description" content="Story about my dog 
giving birth to puppies." />
<meta name="keywords" content="stories, tales, harriet, smith, 
harriet smith, storytelling, day, life, dog, birth, puppies, happy" />

Почему Мета-теги пропали ?

В установке по умолчанию, WordPress не включают в себя мета-тегов, таких как описание и ключевые слова. Почему? Хорошо, давайте посмотрим на приведенные выше теги.

Вообще,метатеги размещаются в блоке head, может быть несколько метатегов.Атрибуты метатегов имеют вид «имя=значение». Причём, атрибут content описывает значение стоящего перед ним атрибута.

Так, в приведённом выше примере второй тег задает кодировку страницы и третий тег задает язык.
В частности, этот пример устанавливает кодировку, в которой будет стиль английского языка, как в Соединенных Штатах, с использованием набора символов ASCII. Это означает, что страница, вероятно,будет иметь написание, как «center», а не «centre» и «humor», а не «humour». Это также дает информацию в браузер, чтобы определять символы не как китайские.
Далее,атрибуты author и contact information описывают конкретного человека; арибут description
содержит информацию уникальную информацию о конкретной записи (посте); keywords — содержит слова,имеющиеся в данной записи (посте). Вы понимаете структуру?

Все это уникальная информация. WordPress может сделать некоторые магические вещи, но он не может читать ваши мысли. Если вы хотите предоставить поисковым системам более полную информацию, которая является специфичной для ваших веб-страниц, вы должны добавить данные мета-тегов самостоятельно.

Являются ли мета-теги необходимыми?

Хороший вопрос. Раньше мета-теги были более полезными, обеспечивая важную информацию для интернет-браузера. Когда браузеры стали более изощренными,необходимость в мета тегах отпала, чтобы выяснить ,например, что ваш сайт написан на английском или китайском языке.
A good question to ask is if meta tags are still necessary. They used to be more helpful, providing important information to the Internet browser. As browsers became more sophisticated, they stopped needing a lot of hand holding in order to figure out if your site is in English or Chinese.

Но Google больше не использует мета-теги в рейтинге результатов поиска и google подтверждает это здесь Webmaster Central Blog.
Some search engines don’t use the meta tag information any more because many people abused it. In fact, meta tags may not represent the content of your site, but, it still doesn’t hurt your status with search engines if you make use of these little bits of information, and do so truthfully. Furthermore, Google does still use the meta description tag in some situations as part of the snippet of your site displayed in search results.

Without a doubt, content is the biggest contributor to search engine page ranking, so if you want to raise your rankings, make sure you have quality content.

Covering all the reasons meta tags are and aren’t important to search engines is beyond the scope of this article. In the Resource section below are some links to more information on meta tags and their impact on search engines.

Putting Meta Tags Back In

To add meta tags to your site, simply add them to the header.php template file in your WordPress Theme, specifically in the head section near the link for the style sheet. At the top you will see the DOCTYPE tag and below that you will see a couple more tags and then the <title> tag, looking something like this:

<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

Below this line you can add your meta tags. You can add meta tag information such as the content, language, author, contact, and copyright, since these are basically the same on every page of your site.

But what about the ‘dynamic’ types of information such as description and keywords? This information is unique to every web page on your site. Putting them in the header.php means the information won’t change throughout your site.

What you need is something to dynamically add keywords and descriptions on a per-post basis. To add a description, keywords, and other meta tags that are unique to each post or Page generated, you have two choices: you can add them as generic references or you can use plugins.

Generic Meta Tags

If you have a clear purpose for your website, then you can use that information to create generic meta tags and place these in your header. Let’s say Harriet Smith is a veterinarian, and enjoys sharing her animal stories on her WordPress blog.

A description meta tag that would describe all of her posts might be:

<meta name="description" content="Special stories and 
tales about dogs, cats, birds, ferrets, and other 
domestic animals as told by Harriet Smith, 
veterinarian. Stories include tales of animal 
bravery and courage, life and death, companionship, 
and the wonderful joy animals and pets bring to 
their human partners." />

If Harriet writes a story about a dog giving birth in the middle of a hurricane, and accompanying the dog were two humans who risked their lives to stay with the dog during the delivery, the descriptive words of bravery and courage, life and death, pets and human, would surely apply. Another story about an animal that returns home to its owner after missing for 5 years might also be described with the words of bravery, courage, life, death, and companionship.

From these two stories, Harriet could create a good generic set of keywords:

<meta name="keywords" content="stories, tales, 
harriet, smith, harriet smith, storytelling, veterinarian, 
vets, animal doctor, bravery, brave, courage, life, lives, 
death, dying, pets, human, companionship, dog, cat, birds, 
ferrets, pets, pet, birth, puppies" />

With these generic description and keywords meta tags, Harriet’s website would be accurately described and that should please just about any search engine.

This is the manual style of adding a description, but WordPress can make this easier for you. Add your description, similar to above, in your Admin > Options > General panel. The description is entered in the line designated as Tagline. Then paste in the following in your head area.

<meta name="description" content="<?php bloginfo('description'); ?>" />

WordPress will automatically generate the description. Note: Some Themes use this tag in the header just below the title of the blog or site. If you don’t want it there, remove or comment out the tag in the header area.

To get more sophisticated, you can add a conditional tag query that asks «If this is a single post view, show the post title; if this is a multi-post view, show the blog name and description.» The conditional tag query looks like this:

<meta name="description" content="<?php if ( is_single() ) {
        single_post_title('', true); 
    } else {
        bloginfo('name'); echo " - "; bloginfo('description');
    }
    ?>" />

Using Meta Tag Plugins

There are several Plugins that allow the blog administrator to set the keywords, description, and other meta tags to be unique on each post. These plugins make use of the Custom Fields in the Write Post Panel. You can find meta tag Plugins in the Official WordPress Plugin Directory.

Using Meta Tag Plugins allows you to customize each of your meta tags, and to choose the ones you want to add, or not, on a per-post basis. This allows your meta information to better describe each page.

Meta Tag Resources

Here are some sites that will help you learn more about meta tags, how they work, and why you should or shouldn’t use them.

  • Google does not use the keywords meta tag in web ranking
  • UC Berkeley’s Guide to Search Engines
  • Search Engine Watch’s How to Use HTML Meta Tags
  • WebDeveloper’s Back to Basics: Meta Tags
  • W3 Organization’s Global Structure of an HTML Document and Meta Tags
  • header.php code and tutorial outputs the correct robots, googlebot, and msnbot meta depending on page, single, home, archive.
  • Meta Tags for SEO- A Complete Guide

Понравилась статья? Поделить с друзьями:
  • Как изменить местоположение картинки на сайте
  • Как изменить месяц налогового периода
  • Как изменить местоположение интернет сервера
  • Как изменить месторасположение таблицы
  • Как изменить местоположение значков на рабочем столе