Advertisement:

Author Topic: Search only in the title of the article  (Read 69 times)

Gilou26

  • Newbie
  • *
  • Posts: 46
Search only in the title of the article
« on: December 10, 2018, 06:01:32 pm »
Hello,
I use the Osclasswizzards theme 2.0.6 with Osclass 3.8.
The searches are done in the description and the title of the article.
I would like the search to be on the title of the article only.
Is it possible?
Thanks in advance
« Last Edit: January 11, 2019, 07:54:17 pm by Gilou26 »

Gilou26

  • Newbie
  • *
  • Posts: 46
Re: Search only in the title of the article
« Reply #1 on: January 11, 2019, 07:52:31 pm »
Hello,
Can we modify something in this code to allow a search in the title only?

Code: [Select]
  <div class="banner_none" id="form_vh_map">
    <form action="<?php echo osc_base_url(true); ?>" id="main_search" method="get" class="search nocsrf" >
      <div class="container">
        <input type="hidden" name="page" value="search"/>
        <div class="main-search">
          <div class="form-filters">
            <div class="row">
              <?php $showCountry  = (osc_get_preference('show_search_country''osclasswizards_theme') == '1') ? true false?>
              <div class="col-md-<?php echo ($showCountry)? '3' '4'?>">
                <div class="cell">
                  <input type="text" name="sPattern" id="query" class="input-text" value="" placeholder="<?php echo osc_esc_html(__(osc_get_preference('keyword_placeholder''osclasswizards_theme'), OSCLASSWIZARDS_THEME_FOLDER)); ?>" />
                </div>
              </div>
              <div class="col-md-2">
                <?php  if ( osc_count_categories() ) { ?>
                <div class="cell selector">
                  <?php cs_category_select_with_count('sCategory'null__('Ou selectionnez une catégorie de rosier''osclasswizards')) ; ?>
                </div>
                <?php  ?>
              </div>
  <div class="cell reset-padding">
                  <button  class="btn btn-success btn_search"><i class="fas fa-search"></i> <span <?php echo ($showCountry)? '' 'class="showLabel"'?>><?php echo osc_esc_html(__("Recherchez"OSCLASSWIZARDS_THEME_FOLDER));?></span> </button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </form>
  </div>

Thanks for your help.