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 thread is resolved. Here is a description of the problem and solution.

Problem:
How to show a down arrow if there is a sub menu item in language switcher.

Solution:
This needs custom css.
If the menu is standard then the following code should show an the if there is a submenu in a menu item.
This code requires Font Awesome.

li.menu-item-has-children a span::after { font-family:FontAwesome; content: "\f063"; }

This topic contains 3 replies, has 2 voices.

Last updated by arad 1 year ago.

Assigned support staff: Riffaz.

Author Posts
October 9, 2018 at 9:21 am #2799122

arad

I am trying to: how Down Arrow after language switcher

Link to a page where the issue can be seen: hidden link

I expected to see: a down arrow as shown in the preview of WPML > Language menu.

Instead, I got: nothing

The theme I use is called Salient. It has no down arrow standard. I have managed to customize my other submenu with an arrow down icon, via the appearance > menu function in wordpress. But the language switcher is not available there.

October 9, 2018 at 12:28 pm #2799961

Riffaz
Supporter

Languages: English (English )

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

Hi Arad,

Usually, the dropdown arrow is added by:

::after

Selector
=>hidden link

then styled by following CSS

.main-navigation .menu-item-has-children > a:after {
content: "\f063";
position: absolute;
}

in a standard theme but your theme has something different.
So, I've created a code for you.

Your theme uses Font Awesome. Let's take the advantage from this.

Add this css code to your theme custom css : hidden link

li.menu-item-has-children a span::after { font-family:FontAwesome; content: "\f063"; }
li.menu-item-has-children ul.sub-menu a span::after { display: none; }

If that does not work please move it to Appearance > Editor > Style.css

This will create a dropdown menu arrow right next to your language menu.
But this icon won't be identical to the arrow you have now since the font family/style is not same.
You will have to remove the icon you have now and use this method.
If your theme uses the standard code this will create the arrow next to all the menu items which have a submenu but the above code does not create it in your site.
This needs some specific customization for your theme.
Please contact your theme to ask about this further: hidden link

These kinds of customization is beyond the scope of our support. This being the case please consider contacting one of our certified partners from this link: http://wpml.org/documentation/support/wpml-contractors/

You will get custom assistance you need to get on with your project.

Before doing so please have a look also here: http://wpml.org/documentation/support/wpml-contractors/guidelines-for-people-looking-for-consulting-help/

Let me know.

Regards,
Riffaz.

October 10, 2018 at 8:15 pm #2805710

arad

Thank you.
Your code works for the language switcher. Unfortunately, it doesn't for the other menu, but I can live with it for now. Will ask for assistance at themenectar.com

Thanks again.
Aram

October 10, 2018 at 8:16 pm #2805711

arad

My issue is resolved now. Thank you!