translatepress-url-seo-compatibility
Installation
SKILL.md
TranslatePress URL, SEO, And Domain Compatibility
TranslatePress rewrites internal URLs for the active language. The Business SEO Pack can translate slugs and extend sitemaps; Different Domain per Language can map each language to another host. Plugin/theme code must use WordPress URL APIs, avoid manual language-prefix logic, and vary caches by language and host.
When to use this skill
Trigger when ANY of the following is true:
- Code calls
home_url(),site_url(),get_permalink(),get_term_link(),post_type_link,term_link,rest_url(),admin_url(), or manually builds absolute links. - Code parses
$_SERVER['REQUEST_URI'], performs redirects, registers rewrites, or handles forms on translated pages. - The task mentions TranslatePress SEO Pack, URL Slug Translation,
trp_get_url_for_language,trp_translate_slugs_on_internal_links,trp_hreflang, Different Domain per Language, multilingual sitemap, translated WooCommerce slugs, CORS, canonical, or hreflang.
Generate URLs safely
Prefer WordPress URL functions and let TranslatePress filter them:
$url = get_permalink( $post_id );