Skip Navigation

[Resolved] Hiding taxonomy option

This support ticket is created 4 years, 2 months ago. 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)

This topic contains 4 replies, has 2 voices.

Last updated by leilaG 4 years, 2 months ago.

Assisted by: Raja Mohammed.

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

Languages: English (English )

Timezone: 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 hidden 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

Languages: English (English )

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