-
AuthorPosts
-
January 18, 2024 at 12:08 pm #1431381
Hi!
I have translated the original page in English to Romanian, but the anchor links do not work (n=neither on the ”Contact” button nor in the menu): http://34.154.123.158/ro/reply-ro/
Can you please help me with this issue?
Thank you very much!
January 19, 2024 at 9:15 am #1431457Hey tcampaner,
Thank you for the inquiry.
The ID of the color section containing the contact form in the RO version is still “contact” so you should adjust anchor from “#contacte” to “#contact”. Please edit the menu items in the Appearance > Menus panel and adjust the “Contact” menu item accordingly.
Best regards,
IsmaelJanuary 22, 2024 at 5:15 pm #1431687Hi Ismael,
The Ro version is “contacte” and the English version is “contact”.
If you look at all the other sections is the same issue: http://34.154.123.158/#despre-noi does not lead anywhere.Thank you!
January 23, 2024 at 5:45 am #1431742Hi,
Thank you for the update.
The Ro version is “contacte” and the English version is “contact”.
Yes, we understand. But the anchor in the main menu is still set to “#contact”, so on RO version, it doesn’t scroll down to the correct section. You have to edit the color sections and adjust the ID attribute accordingly or clone the menu and create an RO version of it.
Best regards,
IsmaelJanuary 23, 2024 at 1:57 pm #1431786January 23, 2024 at 4:58 pm #1431802Hi,
I have managed to link the RO menu to the correct sections (it seems that the RO page has a different url than the English one, so I have just used the entire url: http://34.154.123.158/reply-ro/#contacte instead of http://34.154.123.158/#contacte).
There is one more thing unsolved: clicking on the logo on the RO version, it send to a 404 page instead of the RO homepage. How can change this?
Thank you!
January 23, 2024 at 10:32 pm #1431820if your language plugin set the correct lang attributes to html – you an use it as:
( this example is for german pages a new logo link)function av_change_logo_link_on_different_languages($link){ $currentlang = get_bloginfo('language'); if($currentlang=="de_DE"){ $link = 'https://lang_specific_link'; } return $link; } add_filter('avf_logo_link','av_change_logo_link_on_different_languages');
January 24, 2024 at 8:38 am #1431862Hi,
Thank you for the update.
You can try @Guenni007’s suggestion above or make sure that the RO home page is properly selected in the RO version of the Enfold > Theme Options > Frontpage Settings.
Best regards,
IsmaelJanuary 24, 2024 at 9:44 am #1431870January 24, 2024 at 10:20 am #1431871Hi,
The plugin is Polylang, not WPML.
I have tried the code provided, but it doesn’t work. The page it sends to is http://34.154.123.158/ro/ instead of http://34.154.123.158/reply-ro/Thank you!
January 24, 2024 at 12:49 pm #1431888does your page have on html a lang attribute?
because your pages are password protected i can not inspect it.for polylang try in child-theme functions.php:
function av_change_logo_link($link){ $lang = pll_current_language('locale'); switch ($lang) { case 'fr_FR': $link = "https://backlink_to_french_page"; break; case 'de_DE': $link = "https://backlink_to_german_page"; break; } return $link; } add_filter('avf_logo_link','av_change_logo_link');
adjust your languages with the examples given above
____________
or shorter if it is one default and one extra lang:function av_change_logo_url($link){ $lang = pll_current_language('locale'); if ($lang == 'ro-RO') { $link = "https://your_needed_link"; } return $link; } add_filter('avf_logo_link','av_change_logo_url');
guess for Romanian it is ro_RO
January 24, 2024 at 2:08 pm #1431903yes, for Romanian is ro_RO. I have tried, but still not working.
I am not that proficient in coding (actually I don’t know how to work with html or php pages). I usually add a code to the Quick CSS section in General Styling.Thank you!
January 24, 2024 at 2:14 pm #1431904I have managed!!!
Found a setting that enables the logo to redirect automatically to the homepage.
Thank you very much for all your help!January 24, 2024 at 6:47 pm #1431938Hi,
Glad to hear that you have this sorted out, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Anchor links not working on translated page’ is closed to new replies.