I use a product plugin for WordPress. The basic search filter that comes with plugin allows to search by product name.
I want to make an advanced search filter that would also consider product specifications.
But the problem is that the plugin stores additional product specifications in ‘post_meta’ table and in serialized format. For example, if we talk about cars, there is no taxonomy ‘color’ and a post meta field in a plugin that would keep car color in it, instead we have taxonomy ‘car-attributes’, that keeps a serialized string like this:
a:2:{s:19:"colors-availability";s:12:"Black, White";}
Because of the serialized storage I cannot address directly to post meta data in a query. My question is following:
Is there any practical way to handle this situation? Is it possible to construct a query that would return custom type posts based on post meta data if this data is serialized in the database?
Any code examples would be appreciated too