Support » Plugin: Relevanssi - A Better Search » Using relevanssi with Couponpress

  • Resolved mireillesan

    (@mireillesan)


    I know this may not be the right place to ask, but I can’t solve this on my own.

    I use Couponpress as a wordpress theme and although I love it, their search option is very limited. The search code is probably altered so that it only gives results of coupons (post) not pages, articles or anything else on my blog. I was hoping that by using Relevanssi this problem would be solved but I’m afraid it didn’t.

    Going to the support forum of Couponpress didn’t work either, so I’m trying my luck here. I already tried creating a custom search page but without luck. Even following the instruction on this page didn’t work: http://codex.wordpress.org/Function_Reference/get_search_form

    Can anyone help me out?

    My website

    http://wordpress.org/extend/plugins/relevanssi/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Your search form has

    <input type="hidden" name="post_type" value="products" />

    in it. That restricts the search to just products. Remove that, and the search will target everything.

    Thread Starter mireillesan

    (@mireillesan)

    I’m afraid that didn’t worked. ^^;;

    But I did found out that altering the value by using a different post_types, does the trick. So I thought of a little work around by using multiple values:

    <input type='text' value='' name='s' id='s' placeholder='Zoek naar producten'>
    <input type='submit' id='searchsubmit' value='Zoeken'>
    <input type='hidden' name='post_type' value='product' />
    <input type='hidden' name='post_type' value='page' />
    <input type='hidden' name='post_type' value='post' />
    <input type='hidden' name='post_type' value='article_type' />
    <input type='hidden' name='post_type' value='faq_type' />
    <input type='hidden' name='post_type' value='coupon' />

    but that doesn’t work either. I can only use it once.

    Plugin Author Mikko Saari

    (@msaari)

    Correct way to list multiple values is

    <input type='hidden' name='post_types' value='product,page,post,article_type,faq_type,coupon' />

    or just

    <input type='hidden' name='post_types' value='any' />

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using relevanssi with Couponpress’ is closed to new replies.