WordPress - Design - How to delete an extra button?

In this article, you will find how to delete some extra Weglot button(s). 

When several buttons are displayed after using the "In Menu" design feature (from your WP admin > Weglot plugin), you may need to remove the unnecessary versions. 


1. Find a parent selector 

First, find an HTML parent tag including the Weglot button you want to delete, but not other(s). Otherwise, all buttons will be deleted. 
To find it, you can use the inspector of your browser (right click > Inspect Element). 

For instance, let's that we want to delete the button at the top right of this website : 

As you can see, the main-navigation selector agrees with the situation. 
Indeed, it includes the Weglot button we want to delete (as the blue area shows), but not the others. 

No matter the name of the selector, if it's an "id", you must add a sharp "#" before and if it's a "class", you must add a dot "." before.


2. Edit the CSS rule

Once you've find the right selector, go on your WordPress Dashboard > Weglot > Override CSS and paste that: 

MY_PARENT_SELECTOR .wg-li{
   display: none!important;
}

Here is an example of what it should look like (according to the previous example):


That's it

The related extra button is no more displayed.

Still need help? Contact Us Contact Us