> For the complete documentation index, see [llms.txt](https://developers.weglot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.weglot.com/cms/wordpress/helpers-functions-1/weglot_is_eligible_url.md).

# weglot\_is\_eligible\_url

Lets you force whether a URL counts as translatable for the language switcher, the `hreflang` tags and the `weglot_is_eligible_url()` helper. The filter receives the current decision and the URL object.

```php
add_filter( 'weglot_is_eligible_url', 'custom_weglot_is_eligible_url', 10, 2 );
function custom_weglot_is_eligible_url( $eligible, $weglot_url ) {
    // return true or false to force eligibility
    return $eligible;
}
```

{% hint style="warning" %}
This filter does **not** stop the page from being translated. To keep a page in its original language, use `weglot_active_translation_before_process` (see [Exclude a Custom Post Type](/cms/wordpress/use-cases/exclude-a-custom-post-type.md)) or the URL exclusions.
{% endhint %}
