WPML Avada Button Link Fixer
WordPress plugin that automatically fixes Avada Fusion Builder button links in WPML-translated pages – resolves correct translated URLs including translated slugs.
by SK Online Marketing · github.com/aimitsk/wpml-avada-button-link-fixer · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/aimitsk/wpml-avada-button-link-fixer/archive/refs/heads/main.zipAutomatically fixes Avada Fusion Builder button links in WPML-translated pages. Instead of simply prepending a language prefix (/en/, /nl/ etc.), the plugin queries the WPML database to find the correct translated URL for each button link – including fully translated slugs.
The Problem
When using Avada Fusion Builder with WPML, button links in translated pages often still point to the original (default language) URL. Simply adding a language prefix doesn't work because WPML translates slugs too:
| Button link in translation | Result |
|---|---|
/service/online-preisanfragen/ |
404 – German slug on English page |
/en/service/online-preisanfragen/ |
404 – Prefix added but slug still German |
/en/service/online-price-inquiries/ |
Correct translated URL |
This plugin resolves the correct translated URL automatically.
Requirements
- WordPress 5.0+
- PHP 7.4+
- WPML (active with at least one secondary language)
- Avada Theme with Fusion Builder
Installation
- Download the latest release as ZIP from Releases
- In WordPress: Plugins > Add New > Upload Plugin > select the ZIP
- Activate the plugin
Or clone directly into your plugins folder:
cd wp-content/plugins/
git clone https://github.com/AImitSK/wpml-avada-button-link-fixer.git
Usage
- Go to Tools > Button Link Fixer
- Select the languages you want to fix
- Run a Dry-Run first to preview all changes
- Review the results – the plugin shows exactly which links will be replaced
- Run Live to apply the changes to the database
- Clear your cache (WP Rocket, etc.)
How It Works
- Loads all published translated pages for the selected languages from
icl_translations - Extracts all
link="..."attributes from Fusion Builder shortcodes - For each link, finds the original page via
get_page_by_path() - Queries WPML for the translated version of that page (
wpml_object_idfilter + direct DB fallback) - Retrieves the correct permalink of the translated page
- Replaces the link in the page content
All languages are loaded dynamically from your WPML configuration – no hardcoded language lists.
FAQ
Does it work with other page builders?
Currently only Avada Fusion Builder link="..." attributes are supported.
Is it reversible?
The plugin modifies post_content directly. Always create a database backup before running Live mode. The Dry-Run mode lets you preview all changes safely.
Does it work with custom post types?
It processes pages (post_page) by default.
Changelog
See CHANGELOG.md for a full history.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the GPL-2.0-or-later.
Developed by SK Online Marketing