Skip Navigation

Open

Topic Tags: Language URL

Overview of the issue

If you use a directory for your default language, WPML allows you to set an HTML file as your root page by going to WPMLLanguagesLanguage URL format.

However, doing this may prevent the Translation Tools tab (for WPML versions before 4.5) or Automatic Translation tab (for WPML 4.5 and later) from loading. Instead, you will see following console error:

Uncaught SyntaxError: Unexpected token ‘<‘

Workaround

Our developers are aware of this situation. In the meantime, you can:

  • Set another WordPress page as your root page instead in the same section.
    or
  • Create a custom PHP template in your theme folder with content like the following:
    <?php /* Template Name: Root Page Template */
      wp_redirect( "http://YOURHOSTNAME/it/" );
      exit;
    ?>
    

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>