Retrieve Translated Taxonomy Term IDs
This snippet registers two custom JetEngine macros that dynamically fetch translated taxonomy term IDs based on the original term ID for Polylang and WPML multilingual plugins. It simplifies multilingual content management by automatically applying the correct translated terms in listings and templates.
-
Plugin
-
Category
-
Programming languages
Installing Instruction
How to Add Snippets into the functions.php File of the Active Child Theme
- Copy the required code snippet to your clipboard.
- Navigate to WordPress Dashboard > Appearance > Theme File Editor.
- Click the functions.php tab to open the file.
- Paste the code snippet below the existing code in the Selected file content: area.
- Click the "Update File" page.
Example Use Case
Use this snippet to integrate dynamic translation retrieval in JetEngine listings and macros. It is ideal for multilingual sites using Polylang or WPML, ensuring taxonomy-based content displays the correct language version without manual adjustments.
Applicable scenarios:
- Multilingual websites managing translated taxonomy terms with Polylang or WPML.
- Listings or templates needing automatic term translation support.
- Developers building dynamic content that adapts to the site language.
-
Plugin
-
Category
-
Programming languages