• Resolved christopherrrr

    (@christopherrrr)


    I’m trying to ONLY include the homepage for translation, every single other page should NOT be translated.

    Previously, entering the entire URL of the homepage in the “Do not translate certain paths” – “Translate Only Certain Paths” option (yes, the wording for this option is not good) under advanced settings > exclude strings, was working but recently, maybe within the last month, this stopped working and now the Spanish translated homepage is being redirected to the default language homepage unexpectedly.

    Deactivated all plugins except to TranslatePress and using a default WP theme. When inspecting the 301 redirect, I can see:

    X-Qm-Redirects-Redirect-Trace: trp_exclude_include_redirect_to_default_language(), do_action('template_redirect')

    This tells me that this is the action that is triggered. I traced it to /plugins/translatepress-multilingual/includes/advanced-settings/do-not-translate-certain-paths.php. That page has the function trp_exclude_include_redirect_to_default_language() and in that function it does some checks to see if the current page matches any of the include / exclude options and the strings provided then handles the redirect. trp_return_exclude_include_url($paths, $current_slug, $array_slugs) is returning NULL instead of TRUE for the homepage which I believe is an error. If I use any other path in that option, it works fine but not for the homepage. The homepage URL is not working, “/” is not working, {{home}} is not working.

    What do I need to put in that textarea for “Translate Only Certain Paths” to make it only translate the website homepage?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    Thank you for letting us know about this!
    I passed this information to our developers and we will fix it as soon as possible. (Most likely in the next sprint).
    Keep you posted.

    Cheers,

    jonatbert

    (@jonatbert)

    I have the same problem. I add in the Home Page url in Exclude Strings-> Translate only certain paths.

    /
    /another-page-I-want-to-translate/
    {{home}}

    But the alternative language version of the home page is now hidden and will not reappear even if I clear these settings.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Only include the homepage for translation’ is closed to new replies.