ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Limit simple search to category

April 13, 2012 5:03am

Subscribe [2]
  • #1 / Apr 13, 2012 5:03am

    mddd

    635 posts

    I’m using Simple Search to allow visitors to look for keywords in a site.

    Now I’d like to exclude some pages from being found because these pages are basically just redirects to other stuff. I don’t want them cluttering up the search results.

    I’ve added a category ‘don’t show in search results’ - so I could use that to exclude items from the result set. But how do I do that? i would expect to add something like category=“not 1” to my search tag?

    I could of course hide those results in the result view but then the counts wouldn’t be right so I don’t want to do that.

    How do I achieve this? Here’s my current code for the search form.

    {exp:search:simple_form result_page="zoeken/index" no_result_page="zoeken/geen" results="5" search_in="entries" channel="paginas"}
       <input type="text" name="keywords" id="search" value="Voer zoekterm in" class="empty" />
    {/exp:search:simple_form}
  • #2 / Apr 13, 2012 4:33pm

    Shane Eckert

    7174 posts

    Helo mddd,

    I am sorry to hear you are running into this problem.

    This is only possible with the Advanced Search Form. Can you give that a try and check out the syntax for that?

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases