• 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&#8221; 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]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sumit Singh

    (@5um17)

    Hi,

    I am sorry for the delay.

    The first method from the SE answer will do the job. Could you please let me know what happens when you try with first method?

    Thanks

    Hi, I have a similar need too.

    I tried to use method 1, unfortunately this overwrites all the settings of the plugin, so for example it no longer searches inside the custom fields. Some other idea?

    PS. Adding an “Exact Word” option directly into the admin would be a great idea for the next developments of your plugin! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘woocommerce custom field exact match search’ is closed to new replies.