Tagged: post meta
Jacob Lang(Private) January 11, 2019 at 11:58 pm #198741
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 Moderator(Private) January 18, 2019 at 2:21 pm #199353
Great 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.
The topic ‘Post Meta Search UI Issue’ is closed to new replies.
Our support hours are:10am - 5pm (GMT), Monday - Friday
Please be aware that tickets opened over the weekend will looked at on Monday.