Forums › Forums › Search & Filter Pro › Old option is post meta dropdown still showing up
- This topic has 8 replies, 2 voices, and was last updated 7 years, 3 months ago by Trevor.
-
Anonymous(Private) September 8, 2017 at 7:16 pm #130103
Hello,
So to give you the info about my form.
• Using shortcode display method
• form has 5 post meta fields, all are ACF fields for my products CPT
• have had the form working for over a year now.
• have option to “hide empty”One of the 5 post meta dropdown’s is called “Chemical Name” which is an ACF field on my Products CPT. It had been populating the dropdown options with all chemical names, as long as it was entered into at least one product. That is exactly what I needed it to do.
Recently, my client changed the name of chemical name. And to be more specific it’s almost the exact same name, but a space between 2 words was removed.
The old chemical name: Tert.Butylperoxy-2-ethyl hexanoate
The new chemical name: Tert.Butylperoxy-2-ethylhexanoateAs you can see, it’s the exact same characters, just the one space was removed on all products that had this in the chemical name ACF field.
The issue is now when I go to my search form and click on chemical name dropdown, both show up. And if you click on the old name, it returns nothing. As mentioned before I have the hide empty option checked.
I had noticed once before that after deleting products some of the attributes still appeared in the form dropdowns, but all I had to do is rebuild the cache and it would disappear.
I’ve tried rebuilding the cache many times, but still both chemcial names continue to show up. There is not one product that has the old chemical name so technically it shouldn’t be showing up anymore.
Any help would be greatly appreciated.
Anonymous(Private) September 11, 2017 at 6:34 pm #130455Hi Trevor,
So I updated the Chemical name on that one draft, and it did then remove that chemical name from the form dropdown.
So that resolves the immediate issue with trying to remove that one specific chemical name. The only issues I have is that the form won’t return the product in the results if it’s set to Draft (which is what I want), but the post meta dropdown’s are still picking it up.
In between our conversation, I tried something else. I have an ACF true/false field called “Active”.
I tried doing a conditional check in the post meta section to only show posts if Active field (numeric type) equals 1.
I did some tests and same result. It prevented the posts themselves from showing up in the results, but not the chemical name dropdown, those post’s chemical names still showed up.
Were you able verify if it works correctly in another site or fresh WP install. If not no biggie, I can always try deactivating all other plugins and change to one of the default WP themes. But if you had already checked to see if was a bug with the plugin or is a conflict with the theme I built or one of the plugins installed, that would save me some time.
Thanks again for all your help, Trevor. Your support is always top-notch!
-
AuthorPosts