Translate Custom Parts of OceanWP with WPML

Translating Custom OceanWP Templates with WPML

The free Ocean Extra plugin allows you to create custom OceanWP templates (WordPress dashboard, OceanWP > My Library) like a custom header, custom footer and more. With WPML, you can make these custom templates multilingual. 

What You’ll Need

Before starting, make sure you have the following installed and activated on your site:

Getting Started

To learn more about translating the OceanWP theme with WPML, check out our page about how to turn OceanWP multilingual with WPML.

If you’re new to WPML, we recommend checking out WPML’s Getting Started Guide. It offers a comprehensive overview of the options available with WPML.

Translating Custom OceanWP Templates

Ocean Extra makes it possible to create custom OceanWP templates by going to OceanWP > My Library. You can then replace any existing headers, footers, sidebars, and more with any custom ones you assign by going to Appearance > Customize

Once you publish your custom template in the Customizer, you need to translate:

  • The custom template
  • The post ID of the default language template

Start by going to WPML > Settings:

1. Locate the Post Types Translation section and make the My Library (oceanwp_library) post type Translatable. Remember to Save your changes.

2. Go to OceanWP > My Library and click the plus icon to translate your custom template using the Advanced Translation Editor.

3. Once you’re done translating the template, use the language switcher in the top admin bar to switch to your secondary language.

4. Make a note of the post ID of the translated template.

5. Go to WPML > String Translation and use the In domain dropdown menu to select the domain the strings belong to. In this case, it is admin_texts_theme_mods_oceanwp.

6. Click the plus icon next to the default language template and add the post ID of the translated template.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.