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

    #1431457

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

    #1431687

    Hi 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!

    #1431742

    Hi,

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

    #1431786

    is that a wpml page?
    WPML got WPML CMS Nav to translate the menus.

    #1431802

    Hi,

    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!

    #1431820

    if 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');
    #1431862

    Hi,

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

    #1431870

    Yes – on WPML this is the way – because we have on WPML for each language a separated Enfold Options Dialog. But i do not get an info – if it is a WPML Multilang Installation.

    #1431871

    Hi,

    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!

    #1431888

    does 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

    #1431903

    yes, 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!

    #1431904

    I have managed!!!
    Found a setting that enables the logo to redirect automatically to the homepage.
    Thank you very much for all your help!

    #1431938

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

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Anchor links not working on translated page’ is closed to new replies.