This topic has 12 replies, 3 voices, and was last updated 3 weeks, 2 days ago ago by Andrew Mitchell
Hello, I hope you are doing well.
I want to add an element so that when the user clicks on the “Menu” option, the mobile menu opens up.
How can I do this?
Dear @MAHDAR,
I hope this message finds you well.
Could you kindly provide us with the correct FTP access to your website? This will allow us to upload a potential fix to the following file: xstore/js/modules/mobilePanel.min.js
.
For your convenience, we have also attached the file in the private area, so you may upload it manually and verify if the issue has been resolved.
Thank you for your cooperation.
Best regards,
Jack Richardson
8Theme Team
“I didn’t see your file in the attachment, and I have provided you with FTP access.”
Dear @MAHDAR,
We hope this message finds you well.
We have successfully connected to your FTP; however, it appears that the file cannot be uploaded due to certain server restrictions. We have attached the file below for your convenience. Kindly attempt to upload it yourself.
Additionally, please ensure that you clear your browser and plugin caches before proceeding.
Should you require any further assistance, feel free to reach out.
Best regards,
Jack Richardson
The 8Theme Team
Thank you; I uploaded the file, but it doesn’t seem to differ from the previous file.
Regardless, I deleted the previous file and uploaded the one you provided.
I also cleared the CDN cache and the plugin cache.
However, the menu still didn’t open when clicking on the menu in the bottom panel on mobile.
Hello @MAHDAR
Please, check private area.
Kind regards, Jack Richardson
Thank you.
Since I use the WPML plugin, you previously provided code for translating each language.
Could you create similar code for translating the menu as well?
“element” =>”cart”,
“icon” =>”et_icon-shopping-cart”,
“icon_custom” =>””,
“text” =>”Cart”,
“is_active” => false,
“link” => “”,
“custom_link” =>””
),
Hello, MAHDAR,
We hope this message finds you well. Could you kindly provide us with new FTP access credentials? The ones previously provided are no longer functioning.
Thank you in advance for your assistance.
Best regards,
8Theme Team
Hello, thank you! How are you?
I’ve set a password.
Hello, MAHDAR,
Thank you for providing access. Unfortunately, we do not have similar code for this block, as it is entirely built using Elementor. We recommend using the WPML translation plugin to translate the static block used in this menu. You can find further details in the attached files.
Best regards,
8Theme Team
“Hello, I hope you are doing well.
I mean the menu at the bottom on mobile.
Please see the attached photo.”
Hello, MAHDAR,
We have added the following code to the functions.php file of your child theme. Kindly review it at your convenience.
add_action('init', function(){
add_filter( "theme_mod_mobile_panel_package_et-mobile", function($current_mod){
if (defined( 'ICL_LANGUAGE_CODE' )){
switch (ICL_LANGUAGE_CODE) {
case 'en':
$current_mod = array(
array(
"element" => "home",
"icon" => "et_icon-home",
"icon_custom" => "",
"text" => "Home",
"is_active" => false,
"link" => "",
"custom_link" => ""
),
array(
"element" => "cart",
"icon" => "et_icon-shopping-cart",
"icon_custom" => "",
"text" => "Cart",
"is_active" => false,
"link" => "",
"custom_link" => ""
),
array(
"element" => "custom",
"icon" => "et_icon-calendar",
"icon_custom" => "",
"text" => "Book an appointment",
"is_active" => false,
"link" => "",
"custom_link" => "https://calendly.com/fendo/stilberatung"
),
array(
"element" => "mobile_menu",
"icon" => "et_icon-dev-menu",
"icon_custom" => "",
"text" => "Menu",
"is_active" => false,
"link" => "",
"custom_link" => ""
)
);
break;
case 'it':
$current_mod = array(
array(
"element" =>"home",
"icon" =>"et_icon-home",
"icon_custom" =>"",
"text" =>"Casa",
"is_active" => false,
"link" => "",
"custom_link" =>""
),
array(
"element" =>"shop",
"icon" =>"et_icon-shop",
"icon_custom" =>"",
"text" =>"",
"is_active" => false,
"link" => "",
"custom_link" =>""
),
array(
"element" =>"cart",
"icon" =>"et_icon-shopping-cart",
"icon_custom" =>"",
"text" =>"Carrello",
"is_active" => false,
"link" => "",
"custom_link" =>""
),
array(
"element" =>"custom",
"icon" =>"et_icon-calendar",
"icon_custom" =>"",
"text" =>"Prenota appuntamento",
"is_active" => false,
"link" => "",
"custom_link" =>"https://calendly.com/fendo/stilberatung"
),
);
break;
case 'fr':
$current_mod = array(
array(
"element" =>"home",
"icon" =>"et_icon-home",
"icon_custom" =>"",
"text" =>"Maison",
"is_active" => false,
"link" => "",
"custom_link" =>""
),
array(
"element" =>"shop",
"icon" =>"et_icon-shop",
"icon_custom" =>"",
"text" =>"",
"is_active" => false,
"link" => "",
"custom_link" =>""
),
array(
"element" =>"cart",
"icon" =>"et_icon-shopping-cart",
"icon_custom" =>"",
"text" =>"Chariot",
"is_active" => false,
"link" => "",
"custom_link" =>""
),
array(
"element" =>"custom",
"icon" =>"et_icon-calendar",
"icon_custom" =>"",
"text" =>"Prendre rendez-vous",
"is_active" => false,
"link" => "",
"custom_link" =>"https://calendly.com/fendo/stilberatung"
),
);
break;
case 'de':
$current_mod = array(
array(
"element" =>"home",
"icon" =>"et_icon-home",
"icon_custom" =>"",
"text" =>"Home",
"is_active" => false,
"link" => "",
"custom_link" =>""
),
array(
"element" =>"shop",
"icon" =>"et_icon-shop",
"icon_custom" =>"",
"text" =>"Shop",
"is_active" => false,
"link" => "",
"custom_link" =>""
),
array(
"element" =>"cart",
"icon" =>"et_icon-shopping-cart",
"icon_custom" =>"",
"text" =>"Warenkorb",
"is_active" => false,
"link" => "",
"custom_link" =>""
),
array(
"element" =>"custom",
"icon" =>"et_icon-calendar",
"icon_custom" =>"",
"text" =>"Termin buchen",
"is_active" => false,
"link" => "",
"custom_link" =>"https://calendly.com/fendo/stilberatung"
),
);
break;
default:
// Do nothing here
break;
}
}
return $current_mod;
} );
});
Best regards,
8Theme Team
You must be logged in to reply to this topic.Log in/Sign up