Home Forums WoodMart support forum Translate Second menu for Product pages

Translate Second menu for Product pages

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #695228

    AntonioS34
    Participant

    Dear staff on my site i link in the private section, if you open it with the default language you can navigate it in the homepage with the default italian menu, and the categories and products pages with second menu for products.
    I translated the default menu with polylang pro version and it works but i cannot translate the other menues for products pages.
    How to fix it? Thanks

    #695370

    Hello,

    Sorry, I did not understand your issue properly. Can you please explain it with the help of a screenshot in which language the header or menu is not translated?

    Best Regards.

    #695385

    AntonioS34
    Participant

    Dear staff,

    I’m using your theme together with Polylang Pro Business + WooCommerce Addon to translate my website into several languages.

    I’ve created one header in Italian for the homepage and other pages, and translated it into four languages. I’ve assigned this header through each page’s settings (for example, for the Home and About us pages I used the default header).

    For other pages such as Services, Shop, and Product Categories, I created a secondary header (with a different background — the default one is “overlap”, the second is not) and translated it into all languages as well.

    The problem is that on single product pages, the header does not inherit the one from the product categories — instead, it automatically loads the default header.

    I also tried setting the header directly in Theme Settings → Single Product → Custom Single Product Header, but nothing changes.
    If I select the Italian header there and save, switching the language still shows the Italian version — it doesn’t change to the translated header.

    So how can I manage multiple headers assigned to different pages and product subcategories, while keeping the correct translation for each language?

    Thank you in advance for your help.

    I also tried adding some code snippets found online to “unlock” the translation of additional headers, but they didn’t work:

    // Force Polylang to register header post types so menus work on products
    add_action( ‘init’, function() {
    if ( function_exists(‘pll_register_post_type’) ) {
    pll_register_post_type(‘xts-header’, [‘public’ => true]);
    }
    });

    // Make hidden Woodmart CPTs translatable (headers, layouts, etc.)
    add_filter(‘pll_get_post_types’, function($types, $is_settings){
    // Display them in Polylang settings
    $types[‘xts-header’] = ‘xts-header’; // Header Builder
    $types[‘woodmart_layout’] = ‘woodmart_layout’; // Layout (if used with conditions)
    $types[‘cms_block’] = ‘cms_block’; // HTML Blocks (if used)
    return $types;
    }, 10, 2);

    // Ensure they also appear in Polylang settings
    add_filter(‘pll_get_post_types’, function($types){
    $types[‘xts-header’] = ‘xts_header_builder’;
    $types[‘woodmart_layout’] = ‘woodmart_layout’;
    $types[‘cms_block’] = ‘cms_block’;
    return $types;
    });

    #695410

    Hello,

    Please check the single product page now, it is showing the correct header similar to the categories header.

    Best Regards.

    #695419

    AntonioS34
    Participant

    No it doesn’t.
    As you can see from the link 1 in the private section, the header showned the menu in the right language but the buttons on the right in the italian language, and also the news link on the top near the flags, and is not correct. And this problem affects all the languages.
    It seems that not use the other header (woodmart-> header builder -> these pages has to use the header prodotti IT, header prodotti EN and so on, one header for one language..) hope i explain.

    #695424

    AntonioS34
    Participant

    I rewrite:
    No it doesn’t.
    As you can see from the link 1 in the private section, the header shows the main menu translate in the right language (english) but the buttons on the right are in the italian language because the header translate only the main menu and not the HEADER in totally, and also the news link on the top near the flags, and is not correct. And this problem affects all the languages.
    It seems that not use the other headers (woodmart-> header builder -> these pages has to use the header prodotti IT, header prodotti EN and so on, one header for one language..) hope i explain.
    While, the other parts of the site has to use the DEFAULT IT, DEFAULT EN and so on…
    ALSO there is a bug: i’m using the layouts for the categories and shop page and if i modify these pages with elementor, they lost the conditions and i’ve only to re-edit and re-save them..

    #695496

    AntonioS34
    Participant

    i’m resolving in this way: opening ALL the products and setting the header in the right language. Is not good, by the way. I will not using anymore woodmart translating if this is the result.

    #695660

    Hello,

    We are sorry that you are experiencing this issue. The code you found is not correct and does not solve this problem.

    Also, selecting the desired header for each product is not the proper solution.

    In this situation, you need to create separate headers for each language, and in that case, you also need to translate the values in Theme Settings.

    However, to investigate in more detail why this is not working on your site, we will need access to your site again (the previous access credentials are no longer valid).

    Best Regards,

    #696359

    AntonioS34
    Participant

    access created, feel free to “play”, it is the draft version of the site. Thanks

    #696583

    Hello,

    After reviewing your site, we indeed found the issue that the option in the theme settings “Custom single product header” was not being translated into other languages. We have fixed this on your site and configured it correctly. You can check this on the “TECH SILENCED CEMENT MIXER WITH GEAR REDUCTION TILTING SYSTEM” product. We will also include this fix in our next update.

    Best Regards,

Viewing 10 posts - 1 through 10 (of 10 total)