woocommerce custom field exact match search
-
Hi, there. Thank you very much for this nice plugin.
I’d like to show search results only by custom field with XML structure like follows.
<wp:postmeta>
<wp:meta_key><![CDATA[searchname]]></wp:meta_key>
<wp:meta_value><![CDATA[Zolmist]]></wp:meta_value>
</wp:postmeta>Thanks to your plugin, I can jump to the product page if I query as “https://qqpost.net/?s=Zolmist&post_type=product” from search bar with keyword of “Zolmist”.
Now, if I search with keyword of “Zol”, the result shows 4 products which contains “zol” in their “searchname” custom fields. But, I want the result page not to show anything unless exact match.
I checked this topic(https://wordpress.stackexchange.com/questions/177183/make-a-wp-query-search-match-exactly-the-search-term/177195#177195) and wondering if Method 2 seems close to what I want to do but I’m not successful to change “post_title” into postmeta key and value yet.
Is there any way I can customize your plugin to exact match custom field search? Or how can I modify the function code to suit my situation?
Thank you very much for your kind attention and support in advance.
Yours sincerely,
The page I need help with: [log in to see the link]
- The topic ‘woocommerce custom field exact match search’ is closed to new replies.