Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1436646

    Good morning guys, good morning Rikard, sorry to bother you. I promise this will be my last request in the forum, but I need your help. We are finally online with our latanadellupobb.it site.

    I am experiencing problems using the menus and the polylang translation plugin. Specifically:
    – on the home page latanadellupobb.it if I click on the flags to change the language, the text on the page changes but the menu still remains only in English;
    – otherwise, in the page https://latanadellupobb.it/it/privacy-policy/ the language change of the menu and text work fine but if I click on the logo in the top left corner I return to the home page only in the English version of the page https://latanadellupobb.it/privacy-policy-en/;
    – if from this page https://latanadellupobb.it/it/privacy-policy/ or from this page https://latanadellupobb.it/privacy-policy-en/ I click on the menu links (which are linked to sections of the home page #contact #rooms etc), nothing happens. For all the different pages of the home page, how can I create a stand-alone menu that, by clicking on various buttons “Welcome”, “Rooms”, “Contact” and “Book” takes me back to the relevant section of the home page?

    In the Polylang plugin support pages, I read that part of the above problems might be related to the Ajax future. Could this be? If so, how can I disable it?

    Obviously, if you have a free translation plugin to recommend, I am very willing to change. The translation of each section was done manually by creating a page for each language.

    Many thanks for your help

    #1436836

    Hey micheladalcastagne,
    Thanks for your patience and the link to your site, I don’t have a lot experience with the polylang plugin, first I noted that your homepage in both languages are named the same so I added the language code to them to sort them out in the theme options because your site domain is showing as a EN language and thus your menu is EN when you want it to be IT:
    Enfold_Support_4989.jpeg
    so now we can sort it out a little better:
    Enfold_Support_4991.jpeg
    Then going to the Languages ▸ Settings I found that you seem to need to choose the language from above before setting the options:
    Enfold_Support_4993.jpeg
    So now I have the menu language to match the page language along with the correct flag.

    Now for your second issue where when you are on the /privacy-policy/ page you can use the menu items to get back to your homepage because all of your menu items are only hash links.
    Since you are not using a child theme I installed the WP Code plugin then added a new snippet, in the top right corner use the PHP snippet as the code type:
    Enfold_Support_2680.jpeg
    then added this code, I also created two new menus for you, one for each /privacy-policy/ page with the full urls to the homepage.

    add_filter( 'wp_nav_menu_args', 'ppen_nav_menu_args' );
    function ppen_nav_menu_args( $args = '' ) {
    if($args['theme_location'] === 'avia') {
    if( is_page( 627 ) ) {
    $args['menu'] = '25';
    }
    return $args;
    }
    }
    
    add_filter( 'wp_nav_menu_args', 'ppit_nav_menu_args' );
    function ppit_nav_menu_args( $args = '' ) {
    if($args['theme_location'] === 'avia') {
    if( is_page( 3 ) ) {
    $args['menu'] = '24';
    }
    return $args;
    }
    }

    Now each /privacy-policy/ page has a working menu to the correct homepage.
    Best regards,
    Mike

    #1437274

    Good morning Mike,

    thank you very much for your valuable help. The site is now fully functional. Really great work. Thanks again.

    Last thing: from an aesthetic point of view, I would like to remove the divider bar from the following section:

    It is a template element and I think it is necessary to work on the code. Could you give me some guidance on this? Many thanks, Michela

    #1437287

    Hi,
    Glad to hear that this custom menu is working. Please note that we ask that each request is asked in a new thread so it will be easier for us to help, this thread is getting quite long now covering multiple requests.
    Thanks for your understanding and for using Enfold.

    Best regards,
    Mike

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