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.

advanced search - search 2 channels (with 1 channel only 1 category)

October 09, 2013 6:34pm

Subscribe [1]
  • #1 / Oct 09, 2013 6:34pm

    adamprocter

    228 posts

    This works great for one search

    {exp:search:simple_form channel="artists" search_in="everywhere" status="open" where="all" result_page="search/searchresults" no_result_page="search/noresults"}
    <div id="searching">
    <input type="text" id="searchbox" name="keywords" placeholder="Search Artists"/>
    <button id="search" name="submit" type='submit'><i class='icon-search'></i></button>
    </div>
    {/exp:search:simple_form}

    and this for another works great for one search

    <div id="searching">
                  <input type="text" id="searchbox" placeholder="Search Projects" name="keywords" />
    <!--                 hidden values to search everything in News with Category Project     -->
                   <input type="hidden" name="search_in" value="everywhere" />
                   <input type="hidden" name="where" value="all" />
                   <input type="hidden" id="channel_id" name='channel_id[]' value="7" />
                   <input type="hidden" id="cat_id" name="cat_id[]" value="45">
         <button id="search" name="submit" type='submit'><i class='icon-search'></i></button>
    </div>

    BUT I want to combine them into one.
    A search that looks in both the Artists channel and the news channel (one catergory)

    Is this possible ? Thanks

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

ExpressionEngine News!

#eecms, #events, #releases