Divi Theme Screenshot

Divi Theme:

  • Download the Divi Theme zip file from your Elegant Themes account.
  • Go to Appearance > Themes > Add New in your WordPress dashboard.
  • Click Upload Theme, select the Divi zip file, and click Install Now. Then click Activate.

Polylang Setup Screenshot

Polylang:

  • Navigate to Plugins > Add New.
  • Search for “Polylang”, then install and activate it.
  • Use the setup wizard or go to Settings > Languages to add languages (e.g., English, French, Spanish).

ACF Plugin Screenshot

Advanced Custom Fields (ACF):

  • Download the ACF plugin from the official site.
  • In Plugins > Add New, click Upload Plugin, select the zip, click Install Now, then Activate.

Create Custom Field Screenshot

New Field Group

Create the Language Selector Custom Field

    • Go to Custom Fields in the WordPress admin.
    • Click Add New and name the field group “Language Selector.”
    • Add a new field with the following:
    • Field Type: Select
    • Field Label: Page Language
    • Choices:
en : EN
fr : FR
es : ES
Field Setup

   
   
   
   
   
 
  • Set Location Rules to “Post Type is equal to Post.”
  • Click Save to save.
Divi Theme Builder

Build a Multilingual Template in Divi

  • Go to Divi > Theme Builder.
  • Create or edit a template.
  • Add your desired sections and modules.
Divi Conditions

Set Conditional Display Based on Language

  • Open the settings of the module you want to conditionally display.
  • Go to the Advanced tab, then Conditions.
Divi Manual Condition
  • Add a condition using “Manual Custom Field Name.”
Custom Field Name: page_language
Value: en / fr / es (as needed)
  • Name the condition descriptively, enable it, and save.
ACF Page Language Example

Apply and Test the Language Selector

  • Create or edit a page of the selected post type.
  • Ensure the Page Language field is visible. (Check Screen Options if it’s not.)
  • Select the appropriate language.
  • Add your content and save.
  • Preview the page to verify the conditional display works.
 

Result: Multilingual Component in Divi

You now have a multilingual component within Divi, controlled by a custom field and displayed conditionally based on the language selected for each page. This solution leverages Divi’s Theme Builder, Polylang’s translation capabilities, and ACF’s custom fields to offer a scalable, low-maintenance solution for multilingual WordPress sites.