Navigation überspringen

[Gelöst] Hiding taxonomy option

This support ticket is created vor 4 Jahren, 2 Monaten. 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)

Dieses Thema enthält 4 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von leilaG vor 4 Jahren, 2 Monaten.

Assistiert von: Raja Mohammed.

Author
Artikel
#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

Sprachen: Englisch (English )

Zeitzone: 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 versteckter Link

#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

Sprachen: Englisch (English )

Zeitzone: 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!