Tell us what you are trying to do?
I have a Category dropdown menu that is being automatically generated by imported content (Apparel, Axles, Doors, etc.). I have used the conditional html output to remove the Category Apparel from the loop, but I need to know how to remove it from the dropdown menu as well.
The dropdown menu is being displayed with the following:
<div class="form-group">
<label for="wpv-wpcf-category">[wpml-string context="wpv-views"]Category[/wpml-string]</label>
[wpv-control-postmeta type="select" field="wpcf-category" default_label="Select Category" url_param="wpv-wpcf-category"]
</div>
But when I put conditional output around the wpv-control-postmeta, it doesn't do anything to remove those options from the dropdown. Is there another way to hide categories?
Is there any documentation that you are following?
https://toolset.com/documentation/legacy-features/views-plugin/conditional-html-output-in-views/
Hello,
How do you setup the custom field "category"?
If it is a custom select field created with Toolset Types plugin, you can find and edit it here:
Dashboard-> Toolset-> Custom Fields, find and edit the specific field group, find and edit the custom field "Category", and remove the option "Apparel"
And you can use custom CSS codes to hide option "Apparel" in frontend, for example:
select[name="wpv-wpcf-category"] option[value="Apparel"]{
display:none;
}
Please replace "Apparel" with the "Apparel" option value
Thank you so much for the help!