-
AuthorPosts
-
May 21, 2018 at 7:15 am #959583
Hi,
I’m developing a three languages site using Polylang plugin link here.
I’m trying to replace the Header Phone Number/Extra Info area with a custom widget that will switch the text for each language. I could not find the correct hook to replace this area; tried to us this function (with several hooks…) but the custom widget was located on the wrong side of the top header underneath the header secondary menu:add_action( ‘avia_meta_header’, ‘enfold_customization_header_widget_area’ );
function enfold_customization_header_widget_area() {
dynamic_sidebar( ‘header’ );
}
I have the same issue for the Copyright area, can you direct me to the hook I should use for this area as well?Can you help solve this issue, is there any other way to switch these areas, will be happy to learn…
Thanks
TamarMay 21, 2018 at 1:17 pm #959734Hey tamar.eyeweb,
There is no hook for that. You need to modify the /enfold/includes/helper-main-menu.php file for that.
Here is more on copyright text
Best regards,
VictoriaMay 21, 2018 at 8:30 pm #959947Hi Victoria,
It looks like you didn’t give much of attention to my questions since you didn’t answer any of them (I don’t see any option in the helper-main-menu.php file to add custom widget replacing the Phone Number/Extra Info area ; and the info on the Copyright you attached, didn’t had any explanation on how to adopt it to different languages). So I will ask again:1. How can I define the Header Phone Number/Extra Info area to be language ‘switchable’ so it will change according to the page language.
2. How can I define the Copyright area to be language ‘switchable’ so it will change according to the page language.Probably I’m not the first one who us Enfold for a multi-language site, so some one must have an answers to my questions.
Thanks’
TamarMay 22, 2018 at 9:28 pm #960525Hello,
Are you there?I have seen this post and tried it but it didn’t work, maybe someone? Any idea?
Thanks
TamarMay 23, 2018 at 4:38 pm #960936Hi,
Thank you for using Enfold.
1.) The phone number field accepts shortcodes so you can create a custom shortcode to render a text based on the current language. Example.
function footag_func( $atts ) { $text = ''; $lang = pll_current_language('locale'); switch ($lang) { case 'de_AT': $text = 'This is a text'; break; case 'fil_PH': $text = 'This is another text'; break; default: $text = 'The default text'; break; } return $text; } add_shortcode( 'footag', 'footag_func' );
Adjust the switch cases to the active languages in your installation. Use this shortcode in the phone field.
[footag]
2.) You can do the same for this field.
Best regards,
IsmaelMay 27, 2018 at 8:16 pm #962875Thank you Ismael!
I actually manage to translate both using CSS.
Thank you again
TamarMay 29, 2018 at 3:08 pm #963748 -
AuthorPosts
- You must be logged in to reply to this topic.