Relevanssi - A Better Search
[resolved] Using relevanssi with Couponpress (4 posts)

  1. mireillesan
    Posted 3 years ago #

    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


  2. Mikko Saari
    Plugin Author

    Posted 2 years ago #

    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.

  3. mireillesan
    Posted 2 years ago #

    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.

  4. Mikko Saari
    Plugin Author

    Posted 2 years ago #

    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' />

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Relevanssi - A Better Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic