WP Residence Help WP Residence Help

  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API
Home / WPEstate Translate Plugin / Shortcode & Widget ID Remapping

Shortcode & Widget ID Remapping

201 views 0

Many WPResidence shortcodes and Elementor widgets point to a property, an agent or a category by its ID. On a translated page those IDs still belong to the original language. WPEstate Translate swaps them for the IDs of the translations, so a Spanish page shows the Spanish property instead of the English one.

CONTENT

  • Why IDs Need to Change
  • Shortcodes: Swapped When the Page Loads
  • Elementor Widgets: Swapped When the Page Is Translated
  • When an Item Has No Translation
  • Turn It On or Off
  • A Card Still Shows the Original Language

Featured Property widget with a Property Id in Elementor

Why IDs Need to Change

Say the English home page shows three properties with [estate_property_list property_ids=”128,144,157″]. Their Spanish translations are separate posts with other IDs. Without the swap, the Spanish home page would list the three English properties.

Shortcodes: Swapped When the Page Loads

Each time a page is shown, WPEstate Translate reads the shortcode and replaces the IDs with those of the current language. Your page content does not change.

What Covered
Shortcodes Names that start with wpestate_, wpresidence_ or estate_, plus property_page and property_page_advanced
Single ID attributes id, post_id, property_id, agent_id, developer_id
ID list attributes ids, post_ids, property_ids, agent_ids, developer_ids
Elementor Shortcode widget Yes, a WPResidence shortcode placed in it is swapped the same way

Elementor Widgets: Swapped When the Page Is Translated

WPResidence Elementor widgets such as Featured Property, Agent Grids or Search Form Builder save the IDs in the widget settings.

  • Auto translate: when WPEstate Translate translates an Elementor page automatically, it also replaces the property, agent and term IDs in the widgets with those of the target language.
  • Manual translation: the new page keeps the IDs of the original. Open each widget on the translated page and choose the translated property, agent or term.

Search Form Builder with Spanish tabs in Elementor

The Search Form Builder tabs also keep a separate cache for each language, so each language shows its own tab names. See Translating Elementor Pages and Widgets and Automatic Translation.

When an Item Has No Translation

If a property or agent has no published translation in the current language, the original ID stays. The shortcode or widget then shows the original item instead of an empty space. When you publish the translation, the page shows it from the next load.

Turn It On or Off

  1. Go to WPEstate Translate > Settings.
  2. Find Elementor & Shortcodes.
  3. Tick or clear Enable compatibility layer for Elementor widgets and WPResidence shortcodes. It is on by default.
  4. Click Save Settings.

A Card Still Shows the Original Language

What you see What to do
A property or agent card in the original language Translate and publish that property or agent. See Translating Posts and Pages.
An Elementor widget on a manually translated page shows the original items Edit the widget on the translated page and pick the translated items.
A search form shows the original category or city names Translate the terms. See Taxonomy Translation.
Old names stay after translating Click Clear WpResidence Cache in the admin bar.

For developers: Elementor Widget Translation (Developer).

WPEstate Translate Plugin

Related Articles

  • String Scanner — Developer Guide
  • The String Scanner
  • Gettext Pipeline & MO Files — Developer Guide
  • Gettext & MO Files — Making Translations Appear on the Front End
MLSImportWordPress IDX Plugin for MLS ListingsImport MLS listings into your WordPress website, customize your property pages, and keep your inventory updated.Start free 30-day trial →

Help Categories

  • 51 Getting Started
  • 72 Installation & Setup
  • 243 Installation FAQ
  • 18Agent, Agency & Developers
  • 5Blog Posts & Blog Lists
  • 39Elementor Shortcodes Built-In
  • 56FAQ
  • 15Footer
  • 37Header
  • 2IDX & MLSImport
  • 23Maps & Location Settings
  • 21Multi-Language - Third Party Plugins
  • 7Other Third party Plugins
  • 21Pages
  • 4Payments & Monetization
  • 20Property Lists, Categories & Archive
  • 37Property Pages & Layouts
  • 32Search & Filtering
  • 162Technical how to | Custom Code
  • 8Technical: Actions and filters
  • 7Technical: Child Theme
  • 86Theme Options & Global Settings
  • 6Translations & Languages
  • 16WPBakery Shortcodes
  • 50WPEstate Translate Plugin
  • 51WPResidence / WPEstate CRM
  • 50WPResidence 5.0 Documentation
  • 9WPResidence Elementor Studio

Join Us On

Powered by WP Estate - All Rights Reserved
  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API