• Hi Im using the plugin in 2 search forms the problem that I have is that for each one I need that the search is only in the posts and a custom post type, for that Im using a hidden input to filter but with the pluggin the search is better in content but ignore the filter, this is the code in the form:

    <form id=”searchform” action=”https://sitename.com/&#8221; method=”get”>
    <input class=”inlineSearch” type=”text” name=”s” value=”Buscar sedes” onblur=”if (this.value == ”) {this.value = ‘Buscar sedes’;}” onfocus=”if (this.value == ‘Buscar sedes’) {this.value = ”;}” />
    <input type=”hidden” name=”post_type” value=”sedes” />
    <input type=”hidden” name=”site_section” value=”sedes” />
    <input class=”inlineSubmit” id=”searchsubmit” type=”submit” alt=”Buscar” value=”Buscar” />
    </form>

    I dont know if I missing something with the plugin maybe an option or If I need to modify my code

    • This topic was modified 4 years, 11 months ago by joelhdz.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ajay

    (@ajay)

    I think I am clear on the post type but what exactly is site_section?

    It looks like you’ll need to add some extra piece of code to modify the Better Search queries for more specific lookups

    Thread Starter joelhdz

    (@joelhdz)

    Is only a code to send the form to a special search page and no to the default one. The detail is that I don’t know how to modify the search, if I need to put any more input to get the result of just searching in the post type or if I need to modify the plugin because I have 2 search forms that must filter differently, Could you help me with any advice about this?

    Plugin Author Ajay

    (@ajay)

    What results do you see with the plugin disabled? Would you be able to provide me a sequence of what this does as I have never seen this before.

    Thread Starter joelhdz

    (@joelhdz)

    If I disable the plugin the search is only in the post type that I want to filter but it only take the title and avoid the content to show the word that is looking for, that why I use the plugin.

    Plugin Author Ajay

    (@ajay)

    One last question, as I’ll need to do some tests to see how I can replicate your search.

    You can either search your site normally or you can sites post types only? Or is it only the latter?

    If it is the latter, then you can just enable the post types to search in the settings page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘filter post_typ’ is closed to new replies.