Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 9 replies, has 2 voices.

Last updated by Raja Mohammed 2 years, 5 months ago.

Assigned support staff: Raja Mohammed.

Author Posts
December 25, 2018 at 10:38 am #3032090

ramezb

I am trying to: Add the custom language switcher

I expected to see: I want to add the custom language swticher (do_action( 'wpml_add_language_selector' )
) next to my cart button

The code has been added in header .php

1.JPG
December 26, 2018 at 10:59 am #3033807

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi There,

Welcome to our forum, I will be handling your ticket.

Can you please share with me a screenshot of the placement of the code, From the screenshot, it seems like the code for custom language is added outside of navigation wrapper and hence its place on top of the page.

In your header.php can you please place the

do_action( 'wpml_add_language_selector' )

next to or inside the navigation div wrapper

<div id="site-navigation-wrap">
// nav elements

// Langage swticher here
do_action( 'wpml_add_language_selector' );
</div>

Please let me know whether this helps, in case you need further assistance feel free to write back.

Thank you and best regards,
Raja

December 27, 2018 at 1:22 am #3035455

ramezb

A line appears next to the menu and appears above the logo

December 27, 2018 at 1:24 am #3035457

ramezb

hidden link

December 27, 2018 at 4:44 am #3035852

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

I would like to request temporary access (wp-admin and FTP) to your test site to take a better look at the issue.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Thank you.

December 27, 2018 at 8:29 am #3036046

ramezb

*The debug information is not valid.
What is the correct form

1.JPG
December 27, 2018 at 9:11 am #3036153

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

I have disabled the debug information and enabled only the WordPress login and FTP fields
Kindly try again now.

December 27, 2018 at 9:32 am #3036202

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

The theme retrieves the navigation menu form wp-content/themes/total/framework/helpers/header-menu.php it is not advisable to add code inside the parent theme. adding the code in the header.php file will not help in this case.

Since this is beyond our support capability and involves a third party theme which is not controlled by us in such case kindly check with your theme author.

We would suggest you kindly use the default WPML language switcher which you can append it to the menu.

https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/

Best Regards,
Raja.

December 30, 2018 at 1:15 am #3042670

ramezb

I want to adjust the list spaces

Capture.JPG
December 31, 2018 at 11:49 am #3045104

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

That's due the theme styling applied to the navigation items. kindly add the CSS snippet in the custom CSS section

#menu-menu_home_page .wpml-ls-menu-item ul.sub-menu { 
    min-width:45px !important; 
    text-align:center; 
}

I hope this helps.

Best regards.
Raja