Forums › Forums › Search & Filter Pro › Post Meta Search UI Issue
Tagged: post meta
- This topic has 8 replies, 2 voices, and was last updated 5 years, 11 months ago by Trevor.
-
Anonymous(Private) January 11, 2019 at 11:58 pm #198741
Hello again!
I have another quick question for you. You last helped me with this topic but now I have another question.
Is there any reason why search and filter (or wordpress) would “remember” old metadata? I’m using the “Post Meta” search UI filter option (see photo).
I have set a couple custom fields (see photo) that are being referenced by the search and filter (photo). But I noticed, for two of the items being referenced by search and filter (Acacia Pomsky for example) when I change one of the posts custom fields state from “NH” to “CA” the search and filter still remembers “NH” even though now none of the posts have a metadata of “NH”.
See this video for example. I show two examples of this issue.
Example #1 from video. Notice the State is CA for “Acacia Pomsky”. The filter works properly when I click CA. BUT when I click “NH” it also filters to Acacia. I then show in the back end that State = CA, so it should only show when I filter to CA. But for some reason it shows when I filter for both CA and NH. I think the reason is because this custom field used to be NH. When I first created this page for Acacia I set the state custom field to NH for testing. I then later switched it to CA. But it’s like wordpress or Search and filter remembers that custom field used to be NH, so it still shows when I filter to NH even though now the custom field is CA.
Example #2 from video. Same thing but this time with “Brookside Pomsky”. The State field USED to be IL. I later changed it to UT (it is now UT). But WordPress still remembers that it was IL, so now it shows under the filter of IL or UT, when it should only show under UT.
Any idea why that might be happening? Does WordPress “remember” these custom fields?
You can see the search and filtear page here for reference: https://pomskyownersassociation.com/lessons/available-pomskies-portal/
Thanks!
Trevor(Private) January 18, 2019 at 2:21 pm #199353Great to speak with you again. For some reason the database had two entries for that custom field for that post, so deleting the incorrect row in the table fixed it. I am not sure why that would happen. It was important to then re-save the post to let our plugin know that something had changed.
I will mark this as resolved.
-
AuthorPosts