the-seo-framework icon indicating copy to clipboard operation
the-seo-framework copied to clipboard

exclude_local_search doesn't work with additional Polylang languages

Open lecklin opened this issue 4 months ago • 2 comments

Describe the bug

On multilingual sites using Polylang the "Exclude this page from all search queries on this site" only works for posts in the default language. If you search for something in another language besides the default, the results include posts regardless of having search exclude checked or not.

How to reproduce the bug

Steps to reproduce the behavior:

  1. Have a WP site with at least 2 languages using Polylang
  2. In a language that is not default, check "Exclude this page from all search queries on this site." for a post
  3. On the side of the site for that language, use the default WP search to look for something that matches the excluded post

Expected behavior

The search result should not include the post that has been excluded from search.

Actual behavior

The search result does include the post that has been excluded from search.

Additional context

After a report of the bug from a live site, I've reproduced this bug locally on a fresh WP install that had only the following in use:

  • Default Twenty Twenty-Five theme
  • Polylang + The SEO Framework

Oddly enough the "Exclude this page from all archive queries on this site" works fine, which I would assume is nearly identical.

lecklin avatar Sep 11 '25 04:09 lecklin

Hi @lecklin,

Thank you for the bug report!

Could you please verify if changing the option "SEO Settings > Performance > [...] Perform alteration:" from "In the database" to "On the site" affects this issue?

sybrew avatar Sep 20 '25 18:09 sybrew

Heyas @sybrew, changing that option has no effect.

lecklin avatar Sep 29 '25 08:09 lecklin