Sauter la navigation

[Résolu] Hiding taxonomy option

This support ticket is created Il y a 4 années et 5 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par leilaG Il y a 4 années et 4 mois.

Assisté par: Raja Mohammed.

Auteur
Publications
#1847179
location-option.png

Hi, I am trying to hide a taxonomy option and have tried:

select[name="wpv-wpcf-location"] option[value="Discovery, Laurus"] {
display: none!important;
}

and

select[name="wpv-wpcf-location[]"] option[value="Discovery, Laurus"] {
display: none!important;
}

But it's not working. Thanks

#1847385

Raja Mohammed
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

The screenshot shows that the element is a checkbox however the css snippet that you have is for the select and option fields.

Alter the css snippet as

input[type="checkbox"][value="Discovery, Laurus"] {
 display:none;
}

Also, I would consider using the element id lien caché

#form-98119e5bb7c6486e875ce34fcc17a9f8-3{
 display:none;
}
#1847695

Hey Raja, thanks for the code, so the first snippet just removed the scheckbox but not the words/label Discovery, Laurus and the 2nd snippet didn't do anything.

#1848143

Raja Mohammed
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Modify the snippet to target the label of the checkbox as well , Try the below snippet

input[type="checkbox"][value="Discovery, Laurus"], 
input[type="checkbox"][value="Discovery, Laurus"] + label {
 display:none;
}
#1848385

Worked perfectly. Thank you!