We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26401
    • 247 Posts
    I realized that the ajax highlighting is highlighting everything
    is there a way to restrict where the span tags get placed and have them only within my content div?
      • 5811
      • 1,717 Posts
      Yes. By using the advSearchHighlithing plugin rather than the default searchHighligthing plugin:

          AdvSearch_Highlight is an advanced "Multi-Part" variant of Search_Highlight
          It allows to frame with "<!--start highlight-->" and <!--end highlight-->
          several parts of the site that will be highligthed
      For instance here is an extract of the template of the ajaxSearch demo site:
          <div class="grid_12">
              <div class="box content">
                  <!--start highlight-->
                  {{article}}
                  <!--end highlight-->
              </div>
          </div>
          <hr />
          <div class="grid_12">
              <div class="boxg">{{googleAds}}</div>
          </div>
          <div class="grid_12 wgbmenu">
              <div class="floatr">{{wgbMenuFooter}}</div>
          </div>
          <div class="grid_12">
              <div id="footer">{{footer}}</div>
          </div>
      Note the use of <!--start highlight--> and <!--end highlight--> to frame the article.
        • 26401
        • 247 Posts
        took me a while to realize I need to disable the default search highlighting plugin