Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

The wrong content gets indexed for a post

Дата публикации: 27-01-2026 08:28:11

Sometimes Relevanssi can get confused and indexes the post content under the wrong post ID. The main symptoms for this are: You can confirm this problem by checking the posts involved with the Relevanssi debugger that shows how Relevanssi has indexed the post. If you have this specific problem, you’ll find that the posts either...
Source

Основное содержимое страницы с новостью.

Sometimes Relevanssi can get confused and indexes the post content under the wrong post ID. The main symptoms for this are:

  • You can’t find a post with words you know should be in the post
  • Searching for a word returns a post that doesn’t have that word

You can confirm this problem by checking the posts involved with the Relevanssi debugger that shows how Relevanssi has indexed the post. If you have this specific problem, you’ll find that the posts either have no or too little content indexed, or have a lot of content that seems to be from the wrong post.

That’s what’s going on: when Relevanssi indexes a post, it gathers up the content in the post and then stores it in the wp_relevanssi database table under the correct post ID. However, in some cases, the process may get disturbed and the content will end up under the wrong post ID.

The most typical cause for this problem is when you have a post loop element on a page. This may be a block or a shortcode, but it’s something that loops through posts. When Relevanssi sees this element and indexes it, it runs the loop and in some cases, the loop will change the post ID Relevanssi thinks it’s indexing.

Solutions

A simple solution is to exclude the loop element from index. The exact method depends on if it’s a block, a shortcode or something else, but if you exclude it, it won’t confuse Relevanssi anymore.

If this is your shortcode, you can write the code in a way that doesn’t confuse Relevanssi. These problems come when your code changes the global $post value. In general, messing with that is not a good idea, so if your loop code uses new WP_Query(), rewrite it to use get_posts() instead. In most cases, using WP_Query should be restricted to templates and in other cases you should use get_posts().

Your account

Not logged in. Log in to see your license details.

SearchPopular Resources
GeneratePress: Query Loop

Relevanssi doesn’t work automatically with the Query Loop block in GeneratePress and GenerateBlocks. Fortunately, the solution is simple: the Query…

Yoast SEO

Starting from versions 2.4.0 (Premium) and 4.3.0 (Free), Relevanssi doesn’t index posts that have been marked “noindex” in the Yoast SEO settings (“Allow search engines to show this Post in search results?”). If the “noindex” setting is in the default value or set to explicit “yes”, Relevanssi indexes the post….

The search form shortcode

Relevanssi includes a search form shortcode that can be used to display a search form. The shortcode is searchform and…

Related Posts:
Indexing term slugs

I have a term who name is for, example, Great Blue Trojans. The slug is GBT.I…

Comment Section:

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1Removing Relevanssi from the quick edit04.702-03-2026
2Add more content to the index for Relevanssi Light01020-04-2026
3Disabling Relevanssi Light for a specific post type09.0420-04-2026
4A New Chapter for Relevanssi01027-03-2026
5Premium 2.30 / Free 4.27011.6512-05-2026
6A New Chapter for Relevanssi – Frontpage01027-03-2026
7comesio solutions – The new home of Relevanssi01027-03-2026
807.0124-07-2026
9Issure of bookmark search06.6929-07-2026

Классификация: . Схожих патентов: 0. Схожих новостей: 9. Тональность: 0. Информативность: 6.22. Источник: www.relevanssi.com.