This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: Exception
This topic contains 5 replies, has 0 voices.
Last updated by Paola Mendiburu 1 week ago.
Assisted by: Paola Mendiburu.
| Author | Posts |
|---|---|
| February 5, 2026 at 4:05 pm #17796910 | |
|
michaelM-221 |
I added a button to the header using the plugin MaxButtons and the text on it doesnt translates |
| February 5, 2026 at 5:22 pm #17797219 | |
|
Paola Mendiburu WPML Supporter since 11/2020
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Madrid (GMT+01:00) |
Hi there! This is Paola and I hope you are well! Please let me know from where do you add the button. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it. Privacy and Security Policy **IMPORTANT** |
| February 5, 2026 at 7:06 pm #17797577 | |
|
michaelM-221 |
are you there ? is someone working on this? |
| February 6, 2026 at 3:06 pm #17800154 | |
|
Paola Mendiburu WPML Supporter since 11/2020
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Madrid (GMT+01:00) |
Hi there! Please let me know where you add the shrotcode [maxbutton id="2"], I can´t find it. It seems you need to create a different shortcode for english. |
| February 8, 2026 at 6:15 am #17802597 | |
|
michaelM-221 |
Its in plugin : Woody snippets-- snippets- 1. BUTTON PHP and is this code: add_action( 'ocean_before_logo', function() { |
| February 9, 2026 at 8:28 am #17803977 | |
|
Paola Mendiburu WPML Supporter since 11/2020
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Madrid (GMT+01:00) |
On this case, please create another button with maxbutton and the update your php code with the following:
add_action( 'ocean_before_logo', function() {
$current_language = apply_filters( 'wpml_current_language', null );
if ( $current_language === 'el' ) {
echo '<div class="header-left-shortcode">' . do_shortcode('[maxbutton id="2"]') . '</div>';
} elseif ( $current_language === 'en' ) {
echo '<div class="header-left-shortcode">' . do_shortcode('[maxbutton id="3"]') . '</div>';
}
});
|