attachment pages redirect что за плагин

WordPress.org

Русский

Attachment Pages Redirect

Описание

There are three possible scenarios where this plugin does something. In all cases, the attachment page must exists, the plugin will not run for deleted attachments:

A) A visitor lands on an attachment page and the parent post is available (not in trash or deleted). A 301 redirect will be issued to redirect the visitor to the parent post.

B) A visitor lands on an attachment page and the parent post was already deleted from trash. A 302 redirect is issued to home page (this can be changed to 301 if you want, see FAQ for more details).

C) A visitor lands on an attachment page and the parent post is in trash, therefore not available for the visitor. It returns a 404 error code to prevent endless redirection loop in old WP releases and redirecting to trashed/not available posts.

There is no options page, simply activate it and will do the job.

If you’re happy with the plugin please don’t forget to give it a good rating, it will motivate me to keep sharing and improving this plugin (and others).

Требования

Установка

Часто задаваемые вопросы

WordPress is returning a 404 error for my attachment pages, will this plugin help?

No. This plugin needs an existing attachment to work, if you deleted the attachment WordPress will return a 404 for its attachment page and this plugin doesn’t support that scenario.

Can I change the HTTP codes used for the redirections?

Since version 1.1 you can do this by adding constants to your wp-config.php file. The example below will switch the redirection codes used by default.

Читайте также:  разминка на все группы мышц перед тренировкой

Use this at your own risk, only if you know what you’re doing!! No support will be offered for this.

Источник

Как отключить страницы вложений в Вордпресс

Покажу три способа отключения страниц вложений в Вордпресс: с помощью плагина Yoast SEO, плагина Attachment Pages Redirect и сниппета.

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

Генерируются у вас эти страницы или нет проверить легко: их видно в Google Search Console и Яндекс Вебмастере. А можно просто в админке сайта открыть любое загруженное изображение и кликнуть по ссылке «Просмотреть страницу вложения».

WordPress: Информация о вложении

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

Yoast SEO

Популярный SEO-плагин решает задачу «из коробки».

Идем сюда: SEO ⟶ Отображение в поисковой выдаче ⟶ Медиа

Yoast SEO: Медиа

Устанавливаем «Перенаправлять URL вложений на файл вложений». То есть при открытии страницы вложения будет осуществлен редирект на само вложение.

Attachment Pages Redirect

Маленький, но полезный плагин с говорящим названием Attachment Pages Redirect выполняет всего одну функцию: делает редирект со страницы вложения.

У плагина три сценария работы:

Сниппет

Самый любимый вордпрессерами ручной способ решения задачи.

Потребуется только создать файл image.php в корне активной темы. Если файл в каталоге уже присутствует, значит редактируем его, предварительно все из него удалив.

Данный код, как и предыдущий плагин, при наличии привязанной к вложению записи осуществляет на нее 301-й редирект, при ее отсутствии — перенаправляет на главную страницу.

Читайте также:  Turcon что за материал

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

Источник

WordPress.org

Русский

Redirect attachment pages for WordPress

Описание

Redirect attachment pages for WordPress is a plugin developed to stop attachment pages to be viewed from users, to prevent not useful pages that in most cases contains only the single image, without title o description. That pages, when indexed, in some cases can negatively affect pagerak increasing the bounce rate. With Redirect attachment pages for WordPress you can properly redirect users and search engines bots to the parent page or to homepage url, if the attachment has no parent.

Features

Redirect attachment pages for WordPress plugin provide you extra features, such as:
* Redirect to attachment parent page
* Redirect to homepage url (if attachment has no parent)

For more information, see Official page.

Docs & Support

You can find help in the support forum on WordPress.org. If you can’t locate any topics that pertain to your particular issue, post a new topic for it.

Translations

You can translate Redirect attachment pages for WordPress on translate.wordpress.org.

Установка

Часто задаваемые вопросы

What happens if someone reaches an attachment page?

Plugin redirect users to attachment parent page permanently
If attachment hasn’t a parent page, plugin redirect to homepage url

Отзывы

Нет отзывов об этом плагине.

Участники и разработчики

«Redirect attachment pages for WordPress» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

«Redirect attachment pages for WordPress» переведён на 1 язык. Благодарим переводчиков за их работу.

Читайте также:  матрица что сначала строка или столбец

Источник

Образовательный портал