Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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
    Tamar

    #959734

    Hey 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,
    Victoria

    #959947

    Hi 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’
    Tamar

    #960525

    Hello,
    Are you there?

    I have seen this post and tried it but it didn’t work, maybe someone? Any idea?
    Thanks
    Tamar

    #960936

    Hi,

    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,
    Ismael

    #962875

    Thank you Ismael!
    I actually manage to translate both using CSS.
    Thank you again
    Tamar

    #963748

    Hi Tamar,

    Great, glad you found a solution. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.