www.relevanssi.com Open in urlscan Pro
2a0b:f240:0:1::8  Public Scan

Submitted URL: http://www.relevanssi.com//knowledge/-base//year/-filter/-from/-the/-search/-query//
Effective URL: https://www.relevanssi.com/knowledge-base/query_posts/
Submission: On September 05 via api from US — Scanned from FI

Form analysis 9 forms found in the DOM

<form>
  <fieldset>
    <legend class="visuallyhidden">Consent Selection</legend>
    <div id="CybotCookiebotDialogBodyFieldsetInnerContainer">
      <div class="CybotCookiebotDialogBodyLevelButtonWrapper"><label class="CybotCookiebotDialogBodyLevelButtonLabel" for="CybotCookiebotDialogBodyLevelButtonNecessary"><strong
            class="CybotCookiebotDialogBodyLevelButtonDescription">Necessary</strong></label>
        <div class="CybotCookiebotDialogBodyLevelButtonSliderWrapper CybotCookiebotDialogBodyLevelButtonSliderWrapperDisabled"><input type="checkbox" id="CybotCookiebotDialogBodyLevelButtonNecessary"
            class="CybotCookiebotDialogBodyLevelButton CybotCookiebotDialogBodyLevelButtonDisabled" disabled="disabled" checked="checked"> <span class="CybotCookiebotDialogBodyLevelButtonSlider"></span></div>
      </div>
      <div class="CybotCookiebotDialogBodyLevelButtonWrapper"><label class="CybotCookiebotDialogBodyLevelButtonLabel" for="CybotCookiebotDialogBodyLevelButtonPreferences"><strong
            class="CybotCookiebotDialogBodyLevelButtonDescription">Preferences</strong></label>
        <div class="CybotCookiebotDialogBodyLevelButtonSliderWrapper"><input type="checkbox" id="CybotCookiebotDialogBodyLevelButtonPreferences" class="CybotCookiebotDialogBodyLevelButton CybotCookiebotDialogBodyLevelConsentCheckbox"
            data-target="CybotCookiebotDialogBodyLevelButtonPreferencesInline" checked="checked" tabindex="0"> <span class="CybotCookiebotDialogBodyLevelButtonSlider"></span></div>
      </div>
      <div class="CybotCookiebotDialogBodyLevelButtonWrapper"><label class="CybotCookiebotDialogBodyLevelButtonLabel" for="CybotCookiebotDialogBodyLevelButtonStatistics"><strong
            class="CybotCookiebotDialogBodyLevelButtonDescription">Statistics</strong></label>
        <div class="CybotCookiebotDialogBodyLevelButtonSliderWrapper"><input type="checkbox" id="CybotCookiebotDialogBodyLevelButtonStatistics" class="CybotCookiebotDialogBodyLevelButton CybotCookiebotDialogBodyLevelConsentCheckbox"
            data-target="CybotCookiebotDialogBodyLevelButtonStatisticsInline" checked="checked" tabindex="0"> <span class="CybotCookiebotDialogBodyLevelButtonSlider"></span></div>
      </div>
      <div class="CybotCookiebotDialogBodyLevelButtonWrapper"><label class="CybotCookiebotDialogBodyLevelButtonLabel" for="CybotCookiebotDialogBodyLevelButtonMarketing"><strong
            class="CybotCookiebotDialogBodyLevelButtonDescription">Marketing</strong></label>
        <div class="CybotCookiebotDialogBodyLevelButtonSliderWrapper"><input type="checkbox" id="CybotCookiebotDialogBodyLevelButtonMarketing" class="CybotCookiebotDialogBodyLevelButton CybotCookiebotDialogBodyLevelConsentCheckbox"
            data-target="CybotCookiebotDialogBodyLevelButtonMarketingInline" checked="checked" tabindex="0"> <span class="CybotCookiebotDialogBodyLevelButtonSlider"></span></div>
      </div>
    </div>
  </fieldset>
</form>

<form><input type="checkbox" id="CybotCookiebotDialogBodyLevelButtonNecessaryInline" class="CybotCookiebotDialogBodyLevelButton CybotCookiebotDialogBodyLevelButtonDisabled" disabled="disabled" checked="checked"> <span
    class="CybotCookiebotDialogBodyLevelButtonSlider"></span></form>

<form><input type="checkbox" id="CybotCookiebotDialogBodyLevelButtonPreferencesInline" class="CybotCookiebotDialogBodyLevelButton CybotCookiebotDialogBodyLevelConsentCheckbox" data-target="CybotCookiebotDialogBodyLevelButtonPreferences"
    checked="checked" tabindex="0"> <span class="CybotCookiebotDialogBodyLevelButtonSlider"></span></form>

<form><input type="checkbox" id="CybotCookiebotDialogBodyLevelButtonStatisticsInline" class="CybotCookiebotDialogBodyLevelButton CybotCookiebotDialogBodyLevelConsentCheckbox" data-target="CybotCookiebotDialogBodyLevelButtonStatistics"
    checked="checked" tabindex="0"> <span class="CybotCookiebotDialogBodyLevelButtonSlider"></span></form>

<form><input type="checkbox" id="CybotCookiebotDialogBodyLevelButtonMarketingInline" class="CybotCookiebotDialogBodyLevelButton CybotCookiebotDialogBodyLevelConsentCheckbox" data-target="CybotCookiebotDialogBodyLevelButtonMarketing" checked="checked"
    tabindex="0"> <span class="CybotCookiebotDialogBodyLevelButtonSlider"></span></form>

<form class="CybotCookiebotDialogBodyLevelButtonSliderWrapper"><input type="checkbox" id="CybotCookiebotDialogBodyContentCheckboxPersonalInformation" class="CybotCookiebotDialogBodyLevelButton"> <span
    class="CybotCookiebotDialogBodyLevelButtonSlider"></span></form>

POST https://www.relevanssi.com/wp-comments-post.php

<form action="https://www.relevanssi.com/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate="" data-zerospam-davidwalsh="protected">
  <p>Are you a Relevanssi Premium customer looking for support? <a href="/support/">Please use the Premium support form</a>.</p>
  <p class="comment-notes"><span id="email-notes">Your email address will not be published.</span> <span class="required-field-message">Required fields are marked <span class="required">*</span></span></p>
  <p class="comment-form-comment"><label for="comment">Comment <span class="required">*</span></label> <textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" required=""></textarea></p>
  <p class="comment-form-author"><label for="author">Name <span class="required">*</span></label> <input id="author" name="author" type="text" value="" size="30" maxlength="245" autocomplete="name" required=""></p>
  <p class="comment-form-email"><label for="email">Email <span class="required">*</span></label> <input id="email" name="email" type="email" value="" size="30" maxlength="100" aria-describedby="email-notes" autocomplete="email" required=""></p>
  <p class="comment-form-url"><label for="url">Website</label> <input id="url" name="url" type="url" value="" size="30" maxlength="200" autocomplete="url"></p>
  <p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"> <label for="wp-comment-cookies-consent">Save my name, email, and website in this browser for the next time
      I comment.</label></p>
  <input type="text" name="wRozn" value="" style="display: none !important;">
  <p class="comment-subscription-form"><input type="checkbox" name="subscribe_comments" id="subscribe_comments" value="subscribe" style="width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;"> <label class="subscribe-label"
      id="subscribe-label" for="subscribe_comments">Notify me of follow-up comments by email.</label></p>
  <p class="comment-subscription-form"><input type="checkbox" name="subscribe_blog" id="subscribe_blog" value="subscribe" style="width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;"> <label class="subscribe-label"
      id="subscribe-blog-label" for="subscribe_blog">Notify me of new posts by email.</label></p>
  <p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Comment"> <input type="hidden" name="comment_post_ID" value="515" id="comment_post_ID">
    <input type="hidden" name="comment_parent" id="comment_parent" value="0">
  </p><input type="hidden" name="zerospam_david_walsh_key" value="u0cgp">
</form>

Name: loginformPOST https://www.relevanssi.com/wp-login.php

<form name="loginform" id="loginform" action="https://www.relevanssi.com/wp-login.php" method="post">
  <p class="login-username">
    <label for="user_login">Username or Email Address</label><br>
    <input type="text" name="log" id="user_login" autocomplete="username" class="input" value="" size="20">
  </p>
  <p class="login-password">
    <label for="user_pass">Password</label><br>
    <input type="password" name="pwd" id="user_pass" autocomplete="current-password" spellcheck="false" class="input" value="" size="20">
  </p>
  <p class="login-remember"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever"> Remember Me</label></p>
  <p class="login-submit">
    <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary" value="Log In"><br>
    <input type="hidden" name="redirect_to" value="https://www.relevanssi.com/knowledge-base/query_posts/">
  </p>
</form>

GET https://www.relevanssi.com/

<form role="search" method="get" class="search-form" action="https://www.relevanssi.com/">
  <label>
    <span class="screen-reader-text">Search for:</span>
    <input type="search" class="search-field" placeholder="Search …" value="" name="s" data-rlvlive="true" data-rlvparentel="#rlvlive_1" data-rlvconfig="default" autocomplete="off" aria-owns="relevanssi_live_search_results_66da3be49678b"
      aria-autocomplete="both">
  </label>
  <input type="submit" class="search-submit" value="Search">
  <span class="relevanssi-live-search-instructions">When autocomplete results are available use up and down arrows to review and enter to go to the desired page. Touch device users, explore by touch or with swipe gestures.</span>
  <div id="rlvlive_1">
    <div aria-expanded="false" aria-live="polite" class="relevanssi-live-search-results" id="relevanssi_live_search_results_66da3be49678b" role="listbox" tabindex="0" style="left: 1070px; top: 1372.72px; width: 153.797px;">
      <div class="live-ajax-messages">
        <div id="relevanssi-live-ajax-search-spinner"></div>
      </div>
      <div class="ajax-results"></div>
    </div>
  </div>
</form>

Text Content

Powered by Cookiebot
 * Consent
 * Details
 * [#IABV2SETTINGS#]
 * About


THIS WEBSITE USES COOKIES

We use cookies to personalise content and ads, to provide social media features
and to analyse our traffic. We also share information about your use of our site
with our social media, advertising and analytics partners who may combine it
with other information that you’ve provided to them or that they’ve collected
from your use of their services.

Consent Selection
Necessary

Preferences

Statistics

Marketing

Show details
 * Necessary 5
   
   Necessary cookies help make a website usable by enabling basic functions like
   page navigation and access to secure areas of the website. The website cannot
   function properly without these cookies.
    * Cookiebot
      2
      Learn more about this provider
      1.gifUsed to count the number of sessions to the website, necessary for
      optimizing CMP product delivery.
      Maximum Storage Duration: SessionType: Pixel Tracker
      CookieConsentStores the user's cookie consent state for the current domain
      Maximum Storage Duration: 1 yearType: HTTP Cookie
    * WordPress.com
      1
      Learn more about this provider
      t.gifEnsures that product pictures are presented correctly on website.
      Maximum Storage Duration: SessionType: Pixel Tracker
    * www.relevanssi.com
      2
      wordpress_test_cookieUsed to check if the user's browser supports cookies.
      Maximum Storage Duration: SessionType: HTTP Cookie
      wpEmojiSettingsSupportsThis cookie is part of a bundle of cookies which
      serve the purpose of content delivery and presentation. The cookies keep
      the correct state of font, blog/picture sliders, color themes and other
      website settings.
      Maximum Storage Duration: SessionType: HTML Local Storage

 * Preferences 0
   
   Preference cookies enable a website to remember information that changes the
   way the website behaves or looks, like your preferred language or the region
   that you are in.
   
   We do not use cookies of this type.

 * Statistics 1
   
   Statistic cookies help website owners to understand how visitors interact
   with websites by collecting and reporting information anonymously.
    * WordPress.com
      1
      Learn more about this provider
      g.gifRegisters statistical data on users' behaviour on the website. Used
      for internal analytics by the website operator.
      Maximum Storage Duration: SessionType: Pixel Tracker

 * Marketing 0
   
   Marketing cookies are used to track visitors across websites. The intention
   is to display ads that are relevant and engaging for the individual user and
   thereby more valuable for publishers and third party advertisers.
   
   We do not use cookies of this type.

 * Unclassified 1
   Unclassified cookies are cookies that we are in the process of classifying,
   together with the providers of individual cookies.
    * Paddle
      1
      Learn more about this provider
      paddle_sessionPending
      Maximum Storage Duration: 1 dayType: HTTP Cookie

Cross-domain consent[#BULK_CONSENT_DOMAINS_COUNT#] [#BULK_CONSENT_TITLE#]
List of domains your consent applies to: [#BULK_CONSENT_DOMAINS#]
Cookie declaration last updated on 4.9.2024 by Cookiebot



[#IABV2_TITLE#]

[#IABV2_BODY_INTRO#]
[#IABV2_BODY_LEGITIMATE_INTEREST_INTRO#]
[#IABV2_BODY_PREFERENCE_INTRO#]
[#IABV2_LABEL_PURPOSES#]
[#IABV2_BODY_PURPOSES_INTRO#]
[#IABV2_BODY_PURPOSES#]
[#IABV2_LABEL_FEATURES#]
[#IABV2_BODY_FEATURES_INTRO#]
[#IABV2_BODY_FEATURES#]
[#IABV2_LABEL_PARTNERS#]
[#IABV2_BODY_PARTNERS_INTRO#]
[#IABV2_BODY_PARTNERS#]


Cookies are small text files that can be used by websites to make a user's
experience more efficient.

The law states that we can store cookies on your device if they are strictly
necessary for the operation of this site. For all other types of cookies we need
your permission.

This site uses different types of cookies. Some cookies are placed by third
party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration
on our website.

Learn more about who we are, how you can contact us and how we process personal
data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your
consent.


Do not sell or share my personal information
Deny Allow selection Customize

Allow all
Powered by Cookiebot by Usercentrics
Skip to content

Relevanssi

Menu
 * Buy Premium
 * Download
 * Features
 * User manual
 * Knowledge Base
 * Support
 * Contact

Knowledge Base > Debugging > Most important Relevanssi debugging trick
Posted on January 26, 2012January 19, 2021


MOST IMPORTANT RELEVANSSI DEBUGGING TRICK

by Mikko Saari

When you have problems with Relevanssi, these are the first steps to take:

 1. Make sure you have the latest version of Relevanssi. If not, upgrade.
 2. Try deactivating the plugin and reactivating it.
 3. Are you using Yoast Local SEO? Read this.
 4. Try deleting the plugin and reinstalling it from scratch.

If that doesn’t help, then approximately 90% of the time the problem is the
same: there’s a query_posts() call on the search results page.

Any calls to query_posts() on search results template make Relevanssi fail
silently. You’re not getting results from Relevanssi any more. This is
unpleasant, but something I can’t really fix, considering that WordPress doesn’t
offer any official way to replace search results and the way Relevanssi is
coupled with WordPress is something of a hack. So, something simple like this
can throw Relevanssi off.

If you’re having problems with Relevanssi, the first step is to check your
search results page, usually search.php. See if there’s a call to query_posts()
and if there is, comment it out. In most cases that is enough to fix the
problem.

It’s not always query_posts(). Appearance of new WP_Query() is another sign of
trouble, or $wp_query->get_posts();. Anything that queries the database for new
posts is trouble for Relevanssi.

If you need help, you can post on the Relevanssi support forum. Please include
the contents of your search results template, put it in a pastebin and share the
link.


RELATED POSTS

SETTING POST_TYPE TO PAGE DOESN'T WORK

For some reason setting the post_type query variable to page doesn't have the
desired effect. Other post types (post, custom post types) work, but page
doesn't do anything. This is not a Relevanssi...

PREMIUM 2.20 / FREE 4.18

This latest update adds new debugging tools, user interface features, and a
Relevanssi exclude feature to the ACF field edit screen. There are also several
minor bug fixes. 2.20.4 / 4.18.3 New ...

PREMIUM 2.24 / FREE 4.21

These versions are maintenance releases, with some new filter hooks that allow
more customization and some requested debugging tools. The rest of the updates
are small bug fixes in fairly uncommon sit...

PREMIUM 2.16 / FREE 4.14

Relevanssi Premium 2.16.0 is a major release that adds new, exciting features.
The most interesting new tool is click tracking, which grants you extra insight
into what the search users are doing. Som...

PREMIUM 2.2.1

It's been a while since the previous Relevanssi Premium release, and there's
enough material to make this a bigger version number shift. The new version
includes bunch of bug fixes, nothing particular...

PREMIUM 2.11 / FREE 4.9

It's been a while since the previous version, and the list of features and bug
fixes in this version has grown long. This version includes several interesting
new features, both for free and Premium. ...

Categories: Debugging
Tags: troubleshooting


271 COMMENTS MOST IMPORTANT RELEVANSSI DEBUGGING TRICK

 1.  guillaume le guillou says:
     February 16, 2012 at 3:07 am
     
     hi
     using relevansi the results are really crapy
     no header
     no ordering
     no listing…
     any idea?
     thx
     g
     
     Reply
     
 2.  Mikko Saari says:
     February 16, 2012 at 4:22 am
     
     So, did you check if there’s a query_posts call on your search results
     page?
     
     Reply
     1. web says:
        March 9, 2012 at 11:21 pm
        
        Hi, same issue, can you give me the code I’ll need to place on my search
        page template? Thanks!
        
        Reply
        
     
 3.  rvencu says:
     February 21, 2012 at 8:53 am
     
     Hi, I got into some problems with the Twenty Eleven theme, when I activate
     Relevanssi I cannot read much in the search result page. In fact it crashes
     in a strange way.
     
     There is no such call to query_posts, of course. More tips for
     troubleshooting would be welcome…
     
     Reply
     1. rvencu says:
        February 21, 2012 at 9:10 am
        
        My mistake. I was messing up with searchblogs in a wrong way (empty
        value). Maybe is a good idea to sanitize this value if empty…
        
        Reply
        
     
 4.  philip says:
     March 19, 2012 at 6:02 pm
     
     Mikko, I notice you’ve been furiously updating Relevanssi Premium. Still,
     if I put admin in the exclusion box, admin searches are all that’s logged.
     With nothing in the box, it logs all searchers, including of course admin.
     
     Reply
     1. Mikko Saari says:
        March 19, 2012 at 6:34 pm
        
        Oh, sorry. I’ve forgot about that… I’ll add it to my new bug tracking
        list right away, and I’ll be sure to check it out the next time I’m
        working at the plugin.
        
        Reply
        
     
 5.  philip says:
     March 22, 2012 at 2:05 pm
     
     Hi Mikko– you’re working hard on updates. Here’s the status of my problem:
     I login as wpadmin. If I exclude that (or even wp) from the search, it logs
     my searches, yet no other users’.
     
     I excluded only “juju” and it logged both my searches and others’. So
     exclusion works with non-administrative entries.
     
     I hope this can be solved. Thanks, Philip
     
     Reply
     
 6.  Mikko Saari says:
     March 22, 2012 at 6:24 pm
     
     You need to use user id, not user name. Looks like a documentation problem…
     
     Reply
     1. philip says:
        March 28, 2012 at 1:56 pm
        
        Hi Mikko– I have tried all combinations of user id and password…using id
        first as name and then as password. No combination works. I don’t think
        I have registered before, so I clicked register. That always brought me
        back to this page…no place to register.
        
        And search exclusion of administrator doesn’t work…even with your latest
        update.
        
        Help! Philip
        
        Reply
        
     
 7.  Mikko Saari says:
     March 28, 2012 at 2:31 pm
     
     Have you tried using numeric user id in the log exclusion?
     
     Reply
     
 8.  philip says:
     April 1, 2012 at 6:55 pm
     
     Yes. I excluded my user id and it logged both admin and all other searches.
     I even tried excluding just the numeric part of my id with the same
     results.
     
     Reply
     
 9.  philip says:
     April 7, 2012 at 11:44 am
     
     Mikko– I’m getting an update to Premium Relevanssi almost every other day.
     Are you really making all these changes?
     
     Reply
     1. Mikko Saari says:
        April 8, 2012 at 7:23 am
        
        There are no updates, it’s just the buggy update API that says so. No
        need to update, unless the version number changes.
        
        Reply
        
     
 10. henk says:
     April 22, 2012 at 2:18 pm
     
     Fuzzy matching not working. I only want to search ‘whole’ words. Why is it
     so difficult to find a plugin or hack to do that? I don’t want anything
     else, only whole words.
     
     Reply
     1. Mikko Saari says:
        April 22, 2012 at 2:59 pm
        
        Disable fuzzy matching, and Relevanssi will match only whole words. It’s
        simple as that. If you use highlighting, that may be a bit deceptive, as
        the highlighting will highlight partial words – that’s not what
        Relevanssi matches, it’s just the highlighting.
        
        Reply
        
     
 11. Glenn Crocker says:
     May 30, 2012 at 6:55 pm
     
     I’m using a MySiteMyWay theme and they have a whole framework it’s built on
     so finding the query_posts() call is really hard (it’s in
     lib/functions/theme.php, line 1449 for me, but I don’t want to make
     framework changes). So I added a wp_reset_query(); call in search.php. It
     now looks like:
     
     
     
     
     No idea whether this is going to cause cancer or have other side-effects,
     but it worked out well for me!
     
     Reply
     
 12. Bob Matsuoka says:
     June 5, 2012 at 3:23 pm
     
     For some reason, searches stopped returning results. It had been working
     fine, now nothing. Even rebuilding the index doesn’t work. No
     query_posts(). Any suggestions for debugging? The log shows lots of
     successful searches in the past, but now nothing.
     
     Reply
     
 13. Bob Matsuoka says:
     June 5, 2012 at 3:24 pm
     
     PS — The index appears to be good:
     
     State of the Index
     
     Documents in the index: 2049
     Terms in the index: 89133
     Highest post ID indexed: 13352
     
     Just nothing on search results page.
     
     Reply
     
 14. rvencu says:
     July 4, 2012 at 12:26 pm
     
     I get the same issue as Bob. Lately I updated WP to 3.4.1 and twenty ten to
     1.4 (I am using a child theme of twenty ten).
     
     Reply
     1. Mikko Saari says:
        July 5, 2012 at 4:39 am
        
        I think we solved Bob’s problem, but I don’t remember how… I’ll have to
        see if I can find out how.
        
        Reply
        1. David Rutan says:
           July 24, 2012 at 2:51 am
           
           I’d love to hear how Bob’s issue gets resolved as well, since I’m
           seeing the same thing. It used to work a few weeks ago, yet now it
           doesn’t provide any results.
           
           If I disable the plugin and search the same terms, it provides tons
           of results.
           Re-enabling and re-indexing doesn’t change the no results issue.
           
           I also made sure there was no query_posts in the search.php document.
           
           Reply
           1. Mikko Saari says:
              July 24, 2012 at 4:14 am
              
              Which version are you running, David?
              
              Reply
              1. Dave Stone says:
                 August 15, 2012 at 8:44 pm
                 
                 I’m running Relevanssi 3.0.3 for the fist time on WP 3.3.2 and
                 I’m getting the “No posts yet !” message. Index built
                 successfully.
                 
                 I’ve commented out the query_posts in my search.php.
                 I’ve deactivated and reactivated several times.
                 
                 Still no search results. Do you remember how you helped Bob?
              
                 
              2. Mikko Saari says:
                 August 16, 2012 at 3:06 am
                 
                 I think the problem might still be in your search results
                 template somehow.
              
                 
              
           
        
     
 15. owcv says:
     July 12, 2012 at 3:01 pm
     
     I have an issue with the title boost and no query_posts() call on my page.
     The titles of my posts, pages and custom post types doesn’t seem to get the
     needed relevance, even if I have set the boost to 5 in the
     Relevanssi-backend. I want the search results that way, that if the title
     matches, the post/page is on top of the results. How to do that?
     
     Reply
     1. Mikko Saari says:
        July 12, 2012 at 6:04 pm
        
        Well, for starters, 5 is not much – set the boost to 50 or 100 and see
        if that helps.
        
        Reply
        
     
 16. jon says:
     July 26, 2012 at 7:57 am
     
     Hi – I’m using WordPress 3.4.1 and Relevanessi Version 3.0.1. I think I’ve
     used the plugin for over a year or two with no problems. Now, some time
     reasonably recently (last few weeks?) it’s stopped working (just get a “no
     results” message when searching). I’ve double-checked for the presence of
     query_posts() but it’s not there. I notice a couple of other people here
     have what might be the same problem.
     
     Reply
     1. Mikko Saari says:
        July 26, 2012 at 8:00 am
        
        It was probably the update. Try to deactivate and reactivate the plugin
        to see if that helps.
        
        Reply
        
     
 17. jon says:
     July 26, 2012 at 12:14 pm
     
     Ah – that seems to have done it (also re-built the index too – don’t know
     if that helped). Thanks.
     
     Reply
     
 18. Mark says:
     August 1, 2012 at 3:22 pm
     
     Hi, ever since the 3.0.2 upgrade my search results have odd code at the
     end. It’s probably because I’m also using the GD Star Rating plugin. But
     the previous version of Relevanssi didn’t do this. Here’s a sample:
     
     This is Victoria just west of Beacon Hill Park from 1954. You can still
     make out the Empress Hotel and the Parliament Buildings off in the
     distance. UA:F [1.9.20_1166]please wait…Rating: 0.0/5 (0 votes cast)…
     
     Reply
     1. Mikko Saari says:
        August 1, 2012 at 4:10 pm
        
        Yeah, probably something with GD Star Rating. Don’t know what, though…
        
        Reply
        
     
 19. Okiante says:
     August 3, 2012 at 2:15 pm
     
     Hi,
     Can you please let me know what needs to be done to make the plugin working
     with optimizepress? It is not showing any search results after indexing
     pages
     
     Thanks much,
     
     Reply
     1. Mikko Saari says:
        August 3, 2012 at 7:44 pm
        
        No idea, I’m not familiar with the theme. Did you read this post, about
        the query_posts() stuff? That’s your best bet.
        
        Reply
        1. Okiante says:
           August 3, 2012 at 7:46 pm
           
           Hi Mikko,
           Yes, just after submitting the comment I could make it work. Thanks
           so much
           
           Reply
           
        
     
 20. Toni says:
     August 8, 2012 at 6:40 pm
     
     Hi Mikko,
     
     I really like your plugin. There is one thing I can’t seem to fix:
     I want to show custom excerpts of “pages” including a custom read more
     link.
     
     —
     
     Framework:
     Roots: http://www.rootstheme.com/
     
     —
     
     For enabling page excerpts I used:
     http://wordpress.mfields.org/2010/excerpts-for-pages-in-wordpress-3-0/
     
     —
     
     For enabling custom read more links I used:
     http://codex.wordpress.org/Function_Reference/the_excerpt
     
     code used:
     function new_excerpt_more($more) {
     global $post;
     return ‘ID) . ‘”>Read the Rest…‘;
     }
     add_filter(‘excerpt_more’, ‘new_excerpt_more’);
     
     —
     
     In the plugin:
     – Create custom search result snippets: enabled
     – Allowable tags in excerpts: -blanc-
     
     —
     
     Somehow I’m not seeing it and I’ve maxed out my daily coffee intake so if
     you are able to help me fix it or point me in the right direction that
     would be awesome.
     
     oh and no query post shizzle going on.
     
     Regards,
     Toni
     
     Reply
     1. Mikko Saari says:
        August 9, 2012 at 5:46 am
        
        Yeah, looks like the excerpt_more filter doesn’t work. Here’s a
        workaround I found in Twenty Ten:
        
        function custom_excerpt_more( $output ) {
        	if ( has_excerpt() && ! is_attachment() ) {
        		$output .= " &gt; Read the test";
        	}
        	return $output;
        }
        add_filter( 'get_the_excerpt', 'custom_excerpt_more' );
        
        function custom_excerpt_more( $output ) { if ( has_excerpt() && !
        is_attachment() ) { $output .= " &gt; Read the test"; } return $output;
        } add_filter( 'get_the_excerpt', 'custom_excerpt_more' );
        
        Reply
        
     
 21. Toni says:
     August 10, 2012 at 1:24 pm
     
     The test is read.
     
     First part works!
     Thanks for the quick reply
     Up to styling now.
     
     One point:
     It still displays the first few lines of the page instead of the custom
     excerpt.
     How do I hook into my custom Excerpt? Or is the above code for enabling
     excerpts on pages not accurate anymore?
     
     Regards,
     
     Reply
     
 22. Mikko Saari says:
     August 12, 2012 at 5:19 pm
     
     If your theme is using the_excerpt() on search results pages, Relevanssi
     should take over the excerpt, and it doesn’t matter if you have the
     excerpts enabled for pages or not.
     
     Reply
     
 23. Dave Stone says:
     August 16, 2012 at 6:12 pm
     
     Are there any other functions besides query_posts() that may be preventing
     Relevanssi results from appearing?
     
     Reply
     1. Mikko Saari says:
        August 17, 2012 at 3:56 am
        
        No, there shouldn’t be.
        
        Reply
        
     
 24. Bill says:
     August 21, 2012 at 3:55 pm
     
     Mikko,
     
     It appears for us (using HTML5 Reset Framework), we are seeing the index
     build, but we are not getting results for custom content types (using
     Custom Content Type Manager) and custom fields (specifically relation type
     fields).
     
     Some of the content is found in the index table but does not show as a
     result. We should note that the terms are being picked up and indexed for
     the entire custom post type, just not found as a result.
     
     Is there a way we can extend the indexing or results to show this?
     
     Thanks!
     
     Reply
     1. Mikko Saari says:
        August 21, 2012 at 6:16 pm
        
        Bill, if you’re a registered user, please use the support form to send
        me more details. Which version are you using? What are those content
        types? Are they post types, or something else?
        
        Reply
        
     
 25. Hypergolica says:
     August 31, 2012 at 8:34 am
     
     Hi Mikko,
     
     I love Relevanssi and thank you for all the hard work. I’ve got a problem
     that I’ve just noticed recently, one that persists even if I turn off
     Relevanssi, but I’m still hoping you might be able to help me zero in on
     the fix:
     
     Some search results to pages and posts are suddenly missing links to the
     source. For example, look at this page:
     http://www.aur.edu/american-university-rome/?s=accu&submit=Search
     
     Notice the first two results don’t have links, but the third that includes
     the h2 title does and the next one with the h2 title and featured image
     does.
     
     Any idea as to why this is happening?
     
     Yes, I have checked my “search.php” for query_post call and I’m clean. Any
     and all insight you can provide would be greatly appreciated.
     
     Cheers,
     
     Tim
     
     Reply
     1. Mikko Saari says:
        August 31, 2012 at 8:46 am
        
        Tim, problem is in your style sheet. All those results have h2 titles,
        but your style sheet sets .page-title to “display: none”, which means
        they don’t show up. The post meta and bylines appear on those two
        results, because those two are posts and the other are pages. The answer
        to that problem lies in your search results template.
        
        Reply
        1. Hypergolica says:
           August 31, 2012 at 8:50 am
           
           Mikko,
           
           You are a superstar. How did you find that? Now I will try and fix
           it…
           
           Thank you so much!
           
           Tim
           
           Reply
           1. Mikko Saari says:
              August 31, 2012 at 8:53 am
              
              Took a look at your site using the “Inspect element” feature of
              Google Chrome. It’s the best tool for a web designer. For Firefox,
              you can use Firebug, and other browsers have similar features.
              
              Reply
              1. Hypergolica says:
                 August 31, 2012 at 9:01 am
                 
                 Fixed!!! I changed the CSS to h1.page-title to display none…
                 and now the h2’s appear in the search.
                 
                 Yes, I use the equivalent tool in Safari, but I overlooked what
                 you clearly saw.
                 
                 Thank you again so very much, Mikko!
                 
                 Cheers,
                 
                 Tim
              
                 
              
           
        
     
 26. Zack says:
     September 29, 2012 at 2:01 pm
     
     Results don’t change. No query_post call in search.php. Any suggestions?
     Searches are being logged.
     
     Reply
     
 27. Kurt Overmeyer says:
     October 3, 2012 at 12:04 am
     
     Hi Mikko – I installed your plug-in and then get no results. There does not
     appear to be a query_post() call in the search php. I must be doing
     something wrong but I cannot figure it out. Your plug-in is disabled on the
     site right now. Thanks for any help you can give.
     
     Reply
     1. Mikko Saari says:
        October 3, 2012 at 3:46 am
        
        Which version you have? Is the “Limit searches” option enabled, but the
        “Limit” option empty?
        
        Reply
        1. Kurt Overmeyer says:
           October 3, 2012 at 5:27 pm
           
           The latest version and I had limit searches enabled and the limit set
           to 500. Let me try it without that limit.
           
           Reply
           
        
     
 28. Kurt Overmeyer says:
     October 3, 2012 at 3:18 pm
     
     Here’s what I have – any help would be forever appreciated!
     
     News Topics
     
     <div >
     <h3 id="post-“><a href="” rel=”bookmark” title=”Permanent Link to “>
     
     <?php the_tags('Tags: ', ', ', '’); ?>
     Posted in
     
     |
     
     No posts found. Try a different search?
     
     Reply
     1. Mikko Saari says:
        October 4, 2012 at 5:38 am
        
        Kurt, send me the search template to mikko @ relevanssi.com or post it
        to a pastebin somewhere, as the comment system mangles the code.
        
        Reply
        
     
 29. Ken says:
     November 2, 2012 at 6:48 pm
     
     Hi there. I’d like to first say, great plugin! It’s made our search a lot
     more useful, and is very simple to use.
     
     I am having one problem-whenever the search string is wrapped in quotes
     (e.g., “foo bar”) the page dies, but wordpress doesn’t throw any fatal
     errors. I am using query_posts() (but in the sidebar, not the search result
     section), but commenting them out didn’t help.
     
     Any ideas?
     
     Reply
     1. Mikko Saari says:
        November 5, 2012 at 5:04 am
        
        Ken, like my previous comment says – send me the code to mikko
        @ relevanssi.com or post it to a pastebin, so I can take a look at it.
        
        Reply
        
     
 30. Gio says:
     November 4, 2012 at 9:56 pm
     
     Hello, I installed this plug-in and set the right settings. But I’m stuck
     now. How do I add the searchoption so this is visible on a page or in the
     widgetarea? my site is in dutch
     
     If it works good im getting the premium version.
     
     Reply
     1. Mikko Saari says:
        November 5, 2012 at 5:05 am
        
        Just use the default WordPress search widget, Gio.
        
        Reply
        
     
 31. Ben Greenfield says:
     November 7, 2012 at 2:58 am
     
     So this may be a dumb question, but I’ve installed the plugin. Is there a
     RelevanSSI Search widget or something like that that I can use in the
     sidebar? Thanks!
     
     Reply
     1. Mikko Saari says:
        November 7, 2012 at 4:36 am
        
        Just use the default WordPress search widget, Ben.
        
        Reply
        
     
 32. Johan Terve says:
     November 22, 2012 at 1:23 pm
     
     New WEB site soon to be launched. I must say that this is by far the best
     search engine for sites that I have ever seen. But, I have a small problem.
     Our site is all about “Wi-Fi” so people will search for this term. Problem
     is that relevanssi interpret this as a Boolean NOT searching for all pages
     containing Wi but not Fi, no pages will be found in searches…….
     I there any way to:
     
     A. Have a “include” word saying boolean NOT should not be used for th term
     Wi-Fi.
     
     OR
     
     B. Disable the boolean NOT feature
     
     A bonus question:
     
     People may use wifi, WiFi, Wi-Fi when searching, but my site use Wi-Fi, is
     there any way to define alternative words that should be tied to the
     indexed Wi-Fi term? So searching for wifi will include results containg
     Wi-Fi?
     
     Thanks in advance!
     
     Reply
     1. Mikko Saari says:
        November 23, 2012 at 7:57 am
        
        First of all, if you’re running the free version of Relevanssi (I assume
        so, as you’re not using the customer support form to contact me), there
        simply isn’t a boolean NOT operator in Relevanssi.
        
        What you’re seeing is punctuation removal, which replaces the dash with
        a space, resulting in “wi fi”, which is then not searched, as the
        minimum word length for indexing is 3 by default.
        
        Relevanssi is case insensitive, so that doesn’t matter. There’s the
        synonym feature which you can use to support alternative spellings, but
        what I suggest here is a simple function:
        
        add_filter(‘relevanssi_remove_punctuation’, ‘fix_wifi’, 9);
        function fix_wifi($str) {
        $str = str_replace(‘wi-fi’, ‘wifi’, strtolower($str));
        return $str;
        }
        
        After you add this to functions.php of your theme, reindex. Now every
        occasion of wi-fi, in posts and search queries, will be normalized to
        wifi. Problem solved.
        
        Reply
        1. Johan Terve says:
           November 23, 2012 at 8:17 am
           
           Thank you Mikko!
           
           Reply
           1. Carsten Bach says:
              February 11, 2013 at 2:41 pm
              
              Hey Mikko,
              
              i’ve a similiar Problem and could not get any result while looking
              for “R.O.O.M”, what is a post_title.
              
              I tried setting ‘relevanssi_min_word_length’ to 1, but it doesn’t
              work.
              Then I tried to use your synomys feature and defined ‘room =
              R.O.O.M.’, ‘ROOM = R.O.O.M.’ and it also returned zero results.
              
              My last try was using your “fix_wifi” filter function from the
              comment above. I modified it to str_replace(‘r.o.o.m.’, ‘room’,
              strtolower($str)) but at all nothing worked.
              
              I hope you could point me into the right drection.
              
              Regards Carsten
              
              Reply
              
           
        
     
 33. Dirk Müller says:
     December 11, 2012 at 12:37 pm
     
     We have a strange problem with Relevanssi. We made the index without
     problems, but on the site we have no results, but we can see hits in the
     Relevanssi User Searches. The admin searches works fine,, but no results on
     the side.
     So far as well. We have a Developer Environment, where we use exactly the
     same Software and there it works fine. We make a svn checkout on our
     productivity server, so it is exactly the same software, but it does not
     work outside.
     I changed the theme outside but i got no results. I interchange the DB, but
     it only work in the developer Environment.
     So we supposed that it is a spooky php fenomen. But there is nothing in the
     error.log
     Perhaps you have any suggestion?
     
     Reply
     1. Mikko Saari says:
        December 11, 2012 at 3:57 pm
        
        Dirk, last time someone had a problem like this, it was caused by a
        subtle difference in either Apache or PHP configuration between the
        development and production environments.
        
        Reply
        1. Dirk Müller says:
           December 12, 2012 at 3:33 pm
           
           Thank you Mikko, you got a hint what it could be. I compared the
           php.info and did not find anything suspect.
           
           Reply
           1. Mikko Saari says:
              December 12, 2012 at 3:35 pm
              
              Last time the problem was caused by PCRE settings, I found the
              post in my archives.
              
              Reply
              1. Dirk Müller says:
                 February 11, 2013 at 2:55 pm
                 
                 OK, I Found the source of defect. It was a different Theme of
                 WPTouch Pro, which is a Plugin for Mobile Devices. I could not
                 imagine that this has influence also to the Webtheme, but it
                 could.
              
                 
              2. SN0WKRASH says:
                 July 21, 2013 at 10:31 am
                 
                 We are having the same problem with Relevanssi not working with
                 WPTouch Pro – not showing results
                 using any theme that came with it – how did you solve this
                 problem?
              
                 
              3. Dirk Müller says:
                 July 30, 2013 at 11:22 am
                 
                 The Classic-Theme work for us and I could make a Childtheme
                 from that as well. Do you make any Searchmanipulation in the
                 root-functions.php?
              
                 
              4. SN0WKRASH says:
                 July 30, 2013 at 11:51 am
                 
                 we made no modifications to search and none to the themes and
                 none to the plugin code. What weird is that it shows that there
                 are a number of results, but the actual page says no results
                 found, directly below where it says the search returned x
                 number of results. So I’ll do a search and get a page where at
                 the top it says I have 29 results in the header area, and below
                 that the search results page itself says there were no items in
                 my search. you can see this at http://www.ablogtowatch(dot)com
                 on the smartphone
              
                 
              5. Dirk Müller says:
                 July 30, 2013 at 3:29 pm
                 
                 This is not the same Problem I had. My Search did not work for
                 both: Mobile and Desktop. I had made Category Exclusion for the
                 Search in the Mobiletheme and for that relevansi did not work.
                 But I was surprised that the Mobiletheme from WPTouch Pro
                 effect also my Desktoptheme (Thematic).
                 
                 Your Desktop search works. So I think you have to modify the
                 root-funktons.php to add the search result. Does your Mobile
                 search work without relevansi?
              
                 
              6. SN0WKRASH says:
                 September 5, 2013 at 9:20 pm
                 
                 mobile search does work without relevanssi – I think I have to
                 find another solution because we need mobile to work
              
                 
              7. Brian Hogg says:
                 June 8, 2016 at 2:06 am
                 
                 Probably 3 years too late, but the reason is that search.php in
                 the WPtouch theme uses a custom query. Instead you can use the
                 code from index.php as a base which just loops through the
                 default query.
              
                 
              
           
        
     
 34. Steven Paganelli says:
     January 9, 2013 at 9:56 pm
     
     Im having a similar issue. It worked when i downloaded and tested it but
     just recently i see no results on the search page, only hits in the user
     search logs. I tried everything above, and an upgrade of the plugin but
     still no results show.
     
     Reply
     1. Mikko Saari says:
        January 10, 2013 at 4:59 am
        
        Hard to say what’s wrong. Which version did you download, and to which
        version did you upgrade?
        
        Reply
        1. Steven Paganelli says:
           January 10, 2013 at 5:09 am
           
           I can exactly remember the original version, i think 3.0.1 i have
           since upgraed to Version 3.1.3. Both versions were not displaying
           results. wordpress version 3.4 I understand you can only guess at
           this point, so any pointers or PHP settings you know of would be
           great, thanks!
           
           Reply
           1. Mikko Saari says:
              January 10, 2013 at 5:20 am
              
              I’d start by looking at a var_dump($wp_query); on the search
              results page to see if there’s anything unusual there, then I
              would drop var_dump() calls in Relevanssi search functions
              (relevanssi_search() in lib/search.php) to see where in the
              process the results go missing.
              
              Actually, start in relevanssi_query() (also in lib/search.php) –
              does it return the search results in $posts variable or not?
              
              Reply
              1. Steven Paganelli says:
                 January 10, 2013 at 5:47 am
                 
                 when i ran var_dump($wp_query); on the search results page it
                 returned nothing, but when i do var_dump($wp_query); inside the
                 relevanssi_query() function it returns matching results in an
                 the array. so it is finding the results just not displaying
                 theme, could be a theme issue i guess based on that.
              
                 
              2. Mikko Saari says:
                 January 10, 2013 at 8:25 am
                 
                 Some online shop site I fixed – I’m not sure if it was
                 WP-eCommerce or some other plugin – had a search form that by
                 default excluded products from the search.
                 
                 Add this to your search results page: global $wp_query;
                 var_dump($wp_query->query_vars[‘post_type’]);
              
                 
              3. Steven Paganelli says:
                 January 10, 2013 at 5:04 pm
                 
                 global $wp_query; var_dump($wp_query->query_vars[‘post_type’]);
                 
                 returned blank… im pretty stumped on this as i have not updated
                 anything or even installed new plugins that would cause this
                 conflict.
              
                 
              4. Mikko Saari says:
                 January 11, 2013 at 9:05 am
                 
                 It would help a lot if I could take a look at your site. But
                 check your search form or eCommerce plugin settings to see if
                 the search is not excluding post types.
              
                 
              5. Steven Paganelli says:
                 January 12, 2013 at 10:49 pm
                 
                 Mikko,
                 
                 I appreciate your support, especially since it was free and you
                 did it in your spare time. However i have since purchased a
                 plugin specifically for wp-ecommerce product search. Thanks
                 again!
              
                 
              
           
        
     
 35. Ehsan Mahpour says:
     January 10, 2013 at 5:11 pm
     
     I get no results from relevanssi after I upgraded to the latest version.
     even when I disable the plugin I get no results in the search page.
     Anything I should be checking? I’m using this plugin with jigoshop to
     search products. the post type is “product” and I checked it in the
     settings page to be indexed.
     
     Reply
     1. Mikko Saari says:
        January 11, 2013 at 9:06 am
        
        Is your search set to search products? Check both your search form and
        the Jigoshop settings.
        
        Reply
        
     
 36. Claudia Dinner um 8 says:
     January 20, 2013 at 1:30 pm
     
     Hi,
     first of all I’m a foodblogger from Germany and not a developper. I was
     using Relenavanssi succesfully during the past month but now I get an
     “error 404 page not found” after entering a search criteria. How can a
     dummie like solve that problem?
     I’m using 3.1.3.
     thanks so much.
     Claudia
     
     Reply
     1. Claudia Dinner um 8 says:
        January 20, 2013 at 1:31 pm
        
        a dummie like me, that’s what I wanted to say..
        
        Reply
        1. Mikko Saari says:
           January 20, 2013 at 4:27 pm
           
           Your search form has an error. It comes up with a URL like this:
           http://www.example.com/suchen/?s=speck&submit=Suchen when
           http://www.example.com/?s=speck&submit=Suchen would work.
           
           Your searchform has:
           
           <form id=”searchform” action=”?php bloginfo(‘url’); ?” method=”get”>
           
           when it should have:
           <form id=”searchform” action=”<?php bloginfo(‘url’); ?>”
           method=”get”>
           
           Reply
           1. Claudia Dinner um 8 says:
              January 21, 2013 at 1:26 pm
              
              thanks so much for the hint. I have changed the code, but it did
              not do the trick…. any other ideas?
              
              Reply
              1. Mikko Saari says:
                 January 22, 2013 at 7:59 am
                 
                 You copied the code incorrectly. Make sure the code looks
                 exactly like I posted it. It doesn’t, right now. Do not use
                 copy-paste, but write it yourself. Make it look exactly like in
                 my example.
              
                 
              2. Claudia Dinner um 8 says:
                 January 22, 2013 at 4:22 pm
                 
                 thank you so much for your kind support. I did not copy the
                 code – I typed it. Still it does not return any results. It
                 says that possibly the page has moved. Could it be that
                 somewhere in the function bloginfo(‘url’) there is an invalid
                 path? could it be that I have to change it somewhere on the DB?
                 or in one of the files?
              
                 
              3. Mikko Saari says:
                 January 22, 2013 at 6:00 pm
                 
                 No, the code is wrong. I can’t write the code here, because the
                 comment form mangles it, but it starts (ampersand)lt;?php when
                 it should have (less-than-sign)?php. In the end there’s
                 (ampersand)gt; where a greater-than sign should be. If you’ve
                 written less-than signs and greater-than signs instead of the
                 codes, then you’re using an editor that cannot be used to
                 modify HTML code, and you need an editor that doesn’t ruin PHP
                 code.
              
                 
              
           2. Claudia Dinner um 8 says:
              January 21, 2013 at 1:45 pm
              
              51584012240167772151
              
              9
              6
              1036
              93
              
              FontSize=10000;FName=Arial;Kursiv=0;ULine=0;SThru=0;ForeColor=0;BackC=16777215;TextColor=0;Align=0;BW=1;BS=0;BA=2;BST=2;NOPRINT=0;ArrowType=0;UIDEFMODE=0;;IsLinkValue=0;UseUnique=-1;NLines=1;NChars=30;;;
              
              *DBField
              7
              2864
              000000000VICT_DBA14F102C13E41B8F
              
              that is what I copied from the search form
              
              Reply
              
           3. Claudia Dinner um 8 says:
              January 21, 2013 at 1:46 pm
              
              sorry please delete previous post. copied the wrong text
              Claudia
              
              Reply
              
           4. Claudia Dinner um 8 says:
              January 21, 2013 at 1:46 pm
              
                 
              
              Reply
              
           
        
     
 37. PeterTheta says:
     January 31, 2013 at 1:13 pm
     
     WP 3.5.1, 18 posts, 48 pages
     First ever Relevanssi install, all settings default
     I have indexed
     I looked through search.php and loop.php and did not find query_posts()
     
     Problem:
     Page title ‘About Us’ with permalink /about cannot be found by searching
     ‘about’, ‘about us’, etc.
     
     Possible issue:
     The server is IIS7, with .htaccess fix for permalinks. – yeah, it’s bad but
     I can’t change it
     
     Thoughts?
     
     Reply
     1. Mikko Saari says:
        January 31, 2013 at 6:50 pm
        
        “About” might be a stopword. Check the stopword list. I don’t think it’s
        a huge problem – who searches for “about us” page of a site, with those
        words? I don’t think many people do.
        
        Reply
        1. PeterTheta says:
           February 1, 2013 at 9:54 am
           
           It’s not too big a site so removing the stopwords ‘about’ and ‘us’
           shouldn’t be a problem. And, so far, it looks like we’re in great
           shape. You have another follower, thanks!
           
           Reply
           
        
     
 38. soloreglasgolf says:
     February 5, 2013 at 2:34 pm
     
     Hello,
     I´ve running relevanssi for last 4-6 months.
     Everything seems to be OK. Plugin was updated two-three times without any
     problem.
     But I´ve just updated to version 3.14 and Relevanssi doesn´t work: when
     searching nothing is found.
     I´ve rebuild the index and deactivate-activate the plugin but problem
     remains.
     When deactivating elevanssi standard WP search works OK.
     
     I´m running WP 3.5.1
     
     Any suggestion how to fix the problem?
     
     Thanks!
     
     Reply
     1. Mikko Saari says:
        February 6, 2013 at 4:30 am
        
        Which version did you update from?
        
        Reply
        1. soloreglasgolf says:
           February 6, 2013 at 4:10 pm
           
           I´m not completely sure but since I use to update plugins asap I
           guess I was running 3.1.3.
           
           Reply
           1. Mikko Saari says:
              February 8, 2013 at 7:37 am
              
              In that case it’s hard to say – might be a conflict with your
              other plugins.
              
              Reply
              1. soloreglasgolf says:
                 February 8, 2013 at 9:15 pm
                 
                 Have you got a list of plugins with known conflicts with
                 Relevanssi?
                 Thank a lot!
              
                 
              2. Mikko Saari says:
                 February 10, 2013 at 2:44 pm
                 
                 No, I don’t have a ready list, there are too many other
                 plugins.
              
                 
              
           
        
     
 39. Dasher says:
     July 13, 2013 at 3:09 pm
     
     I need help. I’m not seeing any results in the results page. I’ve used
     Relevanssi in the past (another blog), it worked, so I’m almost sure this
     has something to do with my theme (http://www.arrastheme.com/project-ar2/)
     
     I copy/pasted the codes here: http://pastebin.com/a0hEanyc
     
     Can you please tell me what to change? Thanks and I appreciate your hard
     work.
     
     Reply
     1. Mikko Saari says:
        July 14, 2013 at 5:14 am
        
        At least those codes have nothing unusual. ar2_above_content() might
        have something in it, but I’m not sure. And you’ve tried deactivating
        and reactivating the plugin and reindexing the content? Indexing works
        well?
        
        Reply
        
     
 40. Lars says:
     August 26, 2013 at 5:13 pm
     
     Hi,
     
     there are no documents in the index.
     
     $wpdb->print_error(); Shows no error. So I debugged a query and tried to
     execute in in phpMyAdmin. The result was an error:
     
     #1136 – Column count doesn’t match value count at row 1
     
     Can I post (the very long) query here?
     
     BTW: We use a Multisite Installation.
     
     Cheers,
     Lars
     
     Reply
     1. Mikko Saari says:
        August 27, 2013 at 10:41 am
        
        Lars, if you have free version on a multisite, that’s your problem there
        – you can’t use the free version of Relevanssi on multisite, it’s just
        not compatible.
        
        Reply
        1. stíobhart says:
           November 23, 2013 at 3:28 pm
           
           Well, that’s strange. I came here looking for help with a problem
           similar to the original poster: ie. Relevanssi works great on my
           development laptop but doesn’t seem to be able to build the index on
           my live server. Both WP setups are the same, as I use git to sync
           changes between the dev and production servers.
           
           The thing is, I’m using WP multi-site and Relevanssi most definitely
           *does* work –at least on my development machine. Unfortunately just
           not on the production server.
           
           Reply
           
        
     
 41. Matt says:
     October 17, 2013 at 7:44 pm
     
     Hi. My Theme company (ElegantThemes.com) specifically recommended
     Relevanssi to use with their theme, “Origin.” They recommended Relevanssi
     to me because the standard WP search only returned search results from
     “posts” (but not “pages”).
     
     I am not seeing any different behavior from Relevanssi, so I think it’s not
     working at all. I looked for “query_posts()” within my search result page
     (search.php), but found none. However, I am not a developer, so perhaps I
     am not looking correctly.
     
     Here is the source for search.php. Do you see anything I should change?
     
     Gratefully,
     
     -Matt
     
     =================================
     
     <a href="”>
     
     <?php if ( $thumb ” && !$et_ptemplate_showthumb ) { ?>
     
     <a href="”>
     
     
     
     <a href="” class=”readmore”>
     
     
     
     Reply
     1. Matt says:
        October 17, 2013 at 7:52 pm
        
        Hmmm. my full page is not showing here, but when I click “edit” it
        shows… Can you see it? Or should I email it to you?
        
        Reply
        1. Mikko Saari says:
           October 18, 2013 at 3:39 am
           
           If both Relevanssi and default WP search are returning only posts and
           not pages, you have the post_type set to ‘post’ somewhere. Since your
           theme designer recommends Relevanssi as a solution, I suppose it’s
           not in the theme.
           
           The best way to share template pages is to put them in a pastebin.
           You generally can’t copy and paste HTML and PHP code to comment forms
           and have it stay intact.
           
           If you buy a Premium license, I’ll be glad to see how to get things
           working on your site; unfortunately there are limits to how much I
           can help people who are not Premium subscribers. If you show me your
           search results template and functions.php files, I can take a look at
           them and see if it’s something obvious.
           
           Reply
           
        
     
 42. Nasya Jyoti Demich says:
     December 11, 2013 at 11:33 pm
     
     Hello! i have a theme Infocus (themeforest) which seems to be not
     compartible with free version of Relevanssi as it is… so my question is: if
     i’ll buy the pro version of relevanssi will that fix the problem? or will i
     have support to fix that? i tried to find query_posts() in my theme files
     but i didn’t find anything like this…
     what could be done fore better search results on my web-site
     (http://freak-cabaret.com/)? thank you!
     
     Reply
     1. Mikko Saari says:
        December 12, 2013 at 6:42 am
        
        Switching to Premium won’t change anything: it’s that similar to the
        free version. If you buy Premium, I can take a look at the theme, but I
        can’t promise that I can make it work with Relevanssi, and the support
        doesn’t include complex changes in your theme to make it compatible with
        Relevanssi.
        
        Usually the problematic themes are fairly easy to fix, but not always.
        The more complicated a theme is, the harder it is to fix. If you can
        send me the search results template from your theme (usually it’s
        search.php), I can take a look at it and let you know if it looks like
        an easy job or a difficult one. My email is mikko@relevanssi.seravo.fi.
        
        Reply
        
     
 43. Terskac says:
     February 11, 2014 at 11:38 pm
     
     I have a Tab on a page titled FAQs. FAQ and FAQs does not show up in the
     results. Neither do any of the other tabs on that page. Any ideas how I can
     fix this?http://goldtouchinc.com/cosmichrome-spray-chrome/ I also noticed
     that a single search usually shows that it has been searched twice within a
     few seconds of each other. The results are doubled too.
     
     Reply
     1. Mikko Saari says:
        February 14, 2014 at 12:55 pm
        
        It’s quite possible the contents of your tabs are invisible to
        Relevanssi. It all depends on how they’re done. Is it a shortcode? Or
        something else?
        
        What comes to doubling of search results, that sounds like a problem
        with your search results template.
        
        Reply
        
     
 44. Gaspar Garcia says:
     March 13, 2014 at 6:53 pm
     
     Hi,
     
     I have installed Relevansii with theme Twenty twelve and it works
     perfectly.
     But in another installation with plugin WPML and theme Construct a problem
     appears: Relevansii builds an Index but searches do not provide any
     results.
     
     In WP control panel > Relevansii > settings I have enabled Polylang
     On server… / WP content > plugins > Relevansi I renamed the directory to
     and the file to . Is it correct?
     
     My theme’s file Search.php is available at if you like take it a look.
     
     I have no experience as a developer and work for a non-profit organization.
     Can you help me to solve this problem, please?
     
     Reply
     1. Mikko Saari says:
        March 13, 2014 at 7:23 pm
        
        The link to pastebin.com is not working, so just paste the plain URL
        here, without any HTML codes. Sounds like a problem with the search
        template, yes.
        
        Reply
        1. Gaspar Garcia says:
           March 13, 2014 at 11:40 pm
           
           Hi, MS here it is: http://pastebin.com/dVnpkV3f
           
           Reply
           1. Mikko Saari says:
              March 14, 2014 at 6:33 am
              
              Ah, it’s a framework theme. Those are always more complicated to
              debug, as that template file contains nothing of use – the actual
              search page template is inside the mysite_search() function. Where
              that is, I don’t know. I can’t usually do much of a support for
              framework themes.
              
              Reply
              1. Gaspar Garcia says:
                 March 14, 2014 at 10:57 am
                 
                 Thank you, M. So I go to ask about in the Forum theme support
                 and if I get results, come back. In any case, I congratulate
                 you and thank you for your work.
              
                 
              2. Gaspar Garcia says:
                 March 14, 2014 at 4:48 pm
                 
                 Hi, M. this is the framework response ???:
                 “We use the query_posts, you can find it in various areas in
                 the
                 theme.php file. It’s used for lots of areas in the theme such
                 as
                 excluding categories, portfolios, etc etc.
                 
                 It would probably be best to try and find another plugin.”
              
                 
              3. Mikko Saari says:
                 March 15, 2014 at 6:29 am
                 
                 Ok, so this sounds like switching search plugin or theme is the
                 easiest solution here. I suppose Construct and Relevanssi can
                 be made to work together, but it’s not going to be easy, and
                 it’ll require changes to Construct files.
              
                 
              4. Gaspar Garcia says:
                 March 17, 2014 at 11:42 am
                 
                 I share your opinion, Mikko.
                 
                 I have passed your answer to Construct-framework developer
                 (Mysitemyway) or which suggest me how can I Boolean and
                 advanced search with its product Construct.
                 
                 This is his response: “You would need a plugin or hire a custom
                 freelancer to do that customization.”
                 
                 Is it really necessary to hire a freelancer? As you know, we
                 have no budget in this organization now =(
              
                 
              5. Mikko Saari says:
                 March 17, 2014 at 1:46 pm
                 
                 Well, unless you find someone to do it for free or do it
                 yourself, then yes, you have to hire a freelancer. I know it’s
                 complicated enough that I can’t do it for you for free.
              
                 
              6. Gaspar Garcia says:
                 March 17, 2014 at 2:00 pm
                 
                 I appreciate your opinion. I will discuss the case with the
                 Foundation liable and if they have money, I will talk to you.
                 Thank you
              
                 
              
           
        
     
 45. rodrigord says:
     March 15, 2014 at 10:27 pm
     
     Hi I just updated to the last version and started getting mysql errors. I
     am not really sure what version I was but it was a recent one.
     
     MysqlError: You have an error in your SQL syntax; check the manual that
     corresponds to your MySQL server version for the right syntax to use near
     ‘) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM wp_posts AS
     posts W’ at line 2
     
     Sample stack trace
     
     …mysql_query called at
     /var/www/receitasdemae.com.br/html/wp-includes/wp-db.php (1213)
     …wpdb::query called at
     /var/www/receitasdemae.com.br/html/wp-includes/wp-db.php (1538)
     …var/www/receitasdemae.com.br/html/wp-content/plugins/relevanssi/lib/search.php
     (515)
     …var/www/receitasdemae.com.br/html/wp-content/plugins/relevanssi/lib/search.php
     (971)
     …var/www/receitasdemae.com.br/html/wp-content/plugins/relevanssi/lib/search.php
     (42)
     in relevanssi_query called at ? (?)…
     
     Index looks ok, I already tried recreating it. Also tried to disable/enable
     the plugin again.
     
     Reply
     1. rodrigord says:
        March 15, 2014 at 10:29 pm
        
        Mysql version is 5.5.32
        
        Reply
        
     2. Mikko Saari says:
        March 16, 2014 at 6:42 am
        
        Is there any chance you could get me the problematic MySQL query in it’s
        full form?
        
        For example, try this code:
        
        add_filter(‘relevanssi_query_filter’, ‘rlv_q_f’);
        function rlv_q_f($q) {
        var_dump($q);
        return $q;
        }
        
        Reply
        1. rodrigord says:
           March 28, 2014 at 6:44 am
           
           Hi Mikko, I had replied to that days ago and for some reason the
           reply dissapeared. Maybe because of the SQL in the comment. So I will
           try to send it with a screenshot. The problem is that there is some ”
           IN () ” in the middle of it
           
           Reply
           1. Mikko Saari says:
              March 28, 2014 at 3:25 pm
              
              Yes, that is the problem. Try the development version of
              Relevanssi available from
              http://wordpress.org/plugins/relevanssi/developers/ – does that
              help?
              
              Reply
              1. rodrigord says:
                 March 29, 2014 at 3:40 am
                 
                 It looks ok with the development version, I see the results
                 now. No error anymore. Thanks
              
                 
              
           
        2. rodrigord says:
           March 28, 2014 at 6:45 am
           
           Here is the screenshot
           
           Reply
           
        3. rodrigord says:
           March 28, 2014 at 6:47 am
           
           Yes, there is no way to paste an SQL statement here
           
           Reply
           
        
     
 46. Greg Jones says:
     March 30, 2014 at 5:54 pm
     
     Hi, your plugin displays my category results fine which i need, however it
     only displays the posts images and not the full text, I only see ………….
     in the result and no text. Any idea how to fix it , thanks Greg.
     
     Reply
     1. Mikko Saari says:
        March 30, 2014 at 8:02 pm
        
        Relevanssi doesn’t actually have much to do with what you see on the
        search results page, that is up to your search results template. Check
        your search results template.
        
        Reply
        
     
 47. jeff00seattle says:
     July 1, 2014 at 12:00 pm
     
     “Appearance of new WP_Query() is another sign of trouble, or
     $wp_query->get_posts();. Anything that queries the database for new posts
     is trouble for Relevanssi.”
     
     It is not clear by this comment if a theme has this within its code if this
     is a show-stopper not to use Relvanssi. Please provide what is the
     resolution if found.
     
     Thank you
     
     I am using theme Docs, and it contains:
     
     function have_posts() {
     global $wp_query;
     return $wp_query->have_posts();
     }
     
     which is called within docs/index.php:
     
     query_vars[‘post_type’]); ?>
     
     ID );
     if ( $post_type == ‘post’) {
     get_template_part(‘templates/post’, ‘loop’);
     } elseif ( $post_type == ‘page’) {
     get_template_part(‘templates/page’, ‘loop’);
     } else {
     get_template_part(‘app/’ . $post_type, ‘loop’);
     }
     ?>
     
     Reply
     
 48. Matia says:
     July 18, 2014 at 11:54 pm
     
     My template uses “WP_Query()”, when I comment it out though it breaks the
     whole template. Should it be replaced with something else?
     
     Reply
     1. Mikko Saari says:
        July 19, 2014 at 6:24 am
        
        Yes, commenting out is not enough. Can you post your template to a
        pastebin?
        
        Reply
        
     
 49. Bram says:
     October 14, 2014 at 1:56 pm
     
     Hi,
     
     We have a custom taxonomy archive which shows no results when the
     Relevanssi plugin is enabled, without the plugin everything is fine.
     
     In this taxonomy archive we have a query_posts to change the order of the
     items.
     
     How can we make sure Relevanssi only does it’s thing on the search page and
     not on he taxonomy archive (or any other page)?
     
     Thx!
     
     Reply
     1. Mikko Saari says:
        October 14, 2014 at 6:48 pm
        
        This is a WP 4.0 feature. This code in your functions.php should solve
        the problem:
        
        add_filter(‘relevanssi_prevent_default_request’, ‘rlv_fix_archive_kill’,
        10, 2);
        function rlv_fix_archive_kill($kill, $query) {
        if (empty($query->query_vars[‘s’])) $kill = false;
        return $kill;
        }
        
        Reply
        1. Bram says:
           October 15, 2014 at 10:36 am
           
           Hi Mikko,
           
           Thanks for your help!
           
           I’ve added the code to my functions.php and it actually does what it
           is supposed to do (not replacing the request with “SELECT * FROM
           $wpdb->posts WHERE 1=2”).
           But the taxonomy archive still displays no results, so I think it
           must be something after that.
           
           Any ideas?
           
           Thanks!
           
           Reply
           1. Mikko Saari says:
              October 15, 2014 at 12:03 pm
              
              Try debugging the file lib/search.php; Relevanssi process starts
              in the relevanssi_query() function. What that function does on
              your archive pages?
              
              Reply
              1. Bram says:
                 October 15, 2014 at 1:21 pm
                 
                 In relevanssi_query() $search_ok is true so $posts gets
                 modified, but even when I edit the function to return $posts as
                 it is there are no results.
                 
                 At this point $posts contains the right results.
                 
                 Weird thing is that on the taxonomy archive page is_search()
                 returns true after query_posts, before query_posts it returns
                 false.
              
                 
              2. Mikko Saari says:
                 October 15, 2014 at 2:42 pm
                 
                 Does it help if you do unset($wp_query->query_vars[‘s’]); on
                 the archive page?
              
                 
              3. Bram says:
                 October 15, 2014 at 2:45 pm
                 
                 Yes! That fixed it!
                 Thank you very much!
              
                 
              
           
        2. kray257 says:
           April 29, 2016 at 4:23 pm
           
           Mikko, I am running into this same issue, but the page is an ajax
           call. It doesn’t seem to be firing the filter because it’s on a blank
           template, due to it being an ajax call. Can you please tell me how to
           apply this fix for an ajax call?
           
           Reply
           1. Mikko Saari says:
              April 29, 2016 at 5:47 pm
              
              Sorry, but I don’t know.
              
              Reply
              
           
        
     
 50. Gaurav Agrawal says:
     October 18, 2014 at 1:25 pm
     
     Hi. I am using implicit theme in WordPress version:4.0 for my website. And
     when I use these plugin in my theme it does not show any search results.And
     when I change the theme it works properly and show all results.
     
     Can any one help me??
     
     Reply
     1. Mikko Saari says:
        October 18, 2014 at 1:59 pm
        
        Well, did you read the instructions on this very page?
        
        Reply
        1. Gaurav Agrawal says:
           October 18, 2014 at 2:17 pm
           
           yes, I have tried all suggestions and read all conversations but
           still its not working for me.
           
           Reply
           1. Mikko Saari says:
              October 18, 2014 at 2:18 pm
              
              Please post your theme search results template (usually
              search.php) to a pastebin and share the link.
              
              Reply
              1. Gaurav Agrawal says:
                 October 18, 2014 at 2:23 pm
                 
                 2) {
                 
                 foreach($builders as $builder) {
                 
                 it_shortcode($builder);
                 
                 }
                 
                 } else {
                 
                 echo do_shortcode(‘[blog title=”Blog” icon=”magazine”]’);
                 
                 }
                 
                 ?>
              
                 
              2. Gaurav Agrawal says:
                 October 18, 2014 at 2:25 pm
                 
                 check here….
                 
                 http://pastebin.com/69Q8gRHb
              
                 
              3. Mikko Saari says:
                 October 18, 2014 at 2:36 pm
                 
                 Ok, that looks unusual. Sorry, I can’t help you with that
                 theme, I don’t understand what that does.
              
                 
              4. Gaurav Agrawal says:
                 October 18, 2014 at 3:00 pm
                 
                 Ok, Thanks for your reply.
                 
                 But can you suggest me any option through which i can get some
                 clue??
              
                 
              5. Mikko Saari says:
                 October 18, 2014 at 3:02 pm
                 
                 I’d say theme support, but since this is a plugin compatibility
                 issue, they’re not going to help you.
              
                 
              
           
        
     
 51. Hassan Nawaz says:
     January 9, 2015 at 5:48 am
     
     please help how to remove search results query code to fetch the results
     from this search..please help..this is my search results whole code ..what
     to remove?
     
     (found_posts; ?>)
     
     <a href="”>
     .
     
     <?php get_footer();
     
     Reply
     1. Mikko Saari says:
        January 9, 2015 at 6:14 am
        
        Hassan, please post the complete code to a pastebin, looks like the
        comment form has eaten part of the code. If that is all the code, then
        your template is missing several required parts.
        
        Reply
        
     
 52. Lia Vo says:
     March 2, 2015 at 5:54 pm
     
     Hi Mikko! How do I replace the query so that the plugin works? thanks!
     http://pastebin.com/hNy0HvPu
     
     Reply
     1. Mikko Saari says:
        March 2, 2015 at 8:11 pm
        
        Lia, no need to make changes, that search results template is
        Relevanssi-compatible.
        
        Reply
        1. Lia Vo says:
           March 2, 2015 at 8:23 pm
           
           but it doesn’t work! search turns out no results…:(
           
           Reply
           1. Mikko Saari says:
              March 2, 2015 at 8:26 pm
              
              Lia, the problem is then in somewhere else. Have you built the
              index? Are the correct post types being indexed?
              
              Reply
              1. Lia Vo says:
                 March 3, 2015 at 9:01 pm
                 
                 oh, sorry, now it’s ok! thanks!
              
                 
              
           
        
     
 53. SN0WKRASH says:
     March 15, 2015 at 3:47 pm
     
     Hello, we are using the premium version of this plugin.
     
     In search results, we see the tag pages (we like that a lot) but when you
     click on the tag page title to see it, the link to all of these tag page
     results is just the home page. What can we do to have the link actually go
     to the tag page?
     
     Here’s an example:
     
     http://www.ablogtowatch.com/?s=rolex&orderby=post_type&order=desc
     
     Thanks.
     
     Reply
     1. Mikko Saari says:
        March 15, 2015 at 9:06 pm
        
        Hi, since you’re a Premium member, please use the Premium support
        service – it usually gets answers faster.
        
        Anyway, changing the_permalink() on search results template to
        relevanssi_the_permalink() should do the trick. If this doesn’t work,
        please reply to the support email address (you can find on the sidebar
        in the Relevanssi settings page).
        
        Reply
        
     
 54. Eric says:
     June 23, 2015 at 1:01 pm
     
     Hi,Mikko,help me with this problem.I want my clients to search something in
     my portfolio posts,that is where I put my product in.It seems like I can
     just search the words in the tittle!When I search some words in my
     portfolio posts,nothing appeared!I already set to index portfolio,but still
     I can’t search words in my portfolio posts but not in the tillte.Can you
     tell me how to work?
     
     Reply
     1. Mikko Saari says:
        June 23, 2015 at 2:23 pm
        
        Not with this information. If Relevanssi can’t see the content of posts,
        it may be because you’re using shortcodes or page builders to create the
        content. Or is the content perhaps in a custom field?
        
        Reply
        
     
 55. Mwea says:
     June 28, 2015 at 7:45 pm
     
     Hi !
     
     Just installed your plugin, it looks really great but i cant get any result
     on my search page.. Can you give me any advice to solve this problem ?
     
     Here is the code of my search template : http://pastebin.com/4ed43LbR
     
     Regards !
     
     Reply
     1. Mikko Saari says:
        June 28, 2015 at 9:11 pm
        
        Nothing seems obviously wrong, but it’s a complicated enough template
        that I can’t say for sure.
        
        Reply
        
     
 56. Alessandro Marengo says:
     August 23, 2015 at 6:32 pm
     
     I only see this message “Enable query logging to see stats here.” and an
     empty page. What should I do to see sth?
     
     Reply
     1. Mikko Saari says:
        August 23, 2015 at 7:15 pm
        
        You should enable query logging, if you want to see the stats. If you
        want to see Relevanssi settings, you need to go to Settings >
        Relevanssi.
        
        Reply
        
     
 57. Mikko Saari says:
     August 25, 2015 at 5:44 am
     
     That video is based on Relevanssi 2.7.2. The vulnerability was fixed in
     2.7.3, and Relevanssi has since been checked to make sure that all user
     input goes through necessary security measures.
     
     Reply
     
 58. kowdermeister says:
     December 1, 2015 at 5:07 pm
     
     This could be a great help resource if you would actually share what code
     to use besides what’s known not to work.
     
     Reply
     1. Mikko Saari says:
        December 1, 2015 at 8:35 pm
        
        Ah, but that’s the thing: there is no code necessary. The default search
        results template (see for example WP default themes) works fine. If you
        have a problematic code (as mentioned in the post), just remove it, and
        usually you don’t need to add anything.
        
        Reply
        1. kowdermeister says:
           December 1, 2015 at 8:39 pm
           
           That’s true, if you have a default WP install. I had to develop in
           Timber + Bedrock, it’s a fork, slightly different, search uses.
           WP_Query in that version. If I remove that, obviously nothing will
           happen
           
           The answer would be:
           https://wordpress.org/plugins/relevanssi/faq/
           “Direct access to query engine”
           
           I’ll use that, it would be better to add it to a tutorial page.
           
           Reply
           1. Mikko Saari says:
              December 1, 2015 at 8:42 pm
              
              That is very much beyond any basic tutorials. But since you’re a
              developer, it’s not that hard to use, really. Create a WP_Query
              object with the parameters you want and pass it to
              relevanssi_do_query(). If your WP_Query object is called $query,
              the results will be in $query->posts afterwards.
              
              Reply
              1. kowdermeister says:
                 December 1, 2015 at 8:46 pm
                 
                 Yeah, thanks, I’ve read it in the FAQ, looks simple enough. I’m
                 just suggesting to improve the docs, because it was very
                 confusing for me, I found the FAQ by accident.
                 
                 I don’t really know WP works, some code snippet or search.php
                 setup might help people.
              
                 
              
           
        
     
 59. Danil says:
     January 7, 2016 at 11:27 am
     
     Hi,
     
     using momizat multinews theme. I’ve tried to comment out WP_query,
     commented all out, but no result (or broken pages).Here is the search.php
     code
     
     http://pastebin.com/9DiPJbfH
     
     Can you help me?
     
     Reply
     1. Mikko Saari says:
        January 7, 2016 at 11:29 am
        
        You must also change $query->have_posts() to $have_posts() and
        $query->the_post() to $the_post().
        
        Reply
        1. Danil says:
           January 7, 2016 at 11:35 am
           
           Fatal error: Function name must be a string in
           /home/histor69/public_html/wp-content/themes/multinews-child/search.php
           on line 181
           
           That is a if ( $have_posts() ) line….
           
           Reply
           1. Mikko Saari says:
              January 7, 2016 at 11:35 am
              
              Sorry, have_posts() and the_post(), not $have_posts…
              
              Reply
              1. Danil says:
                 January 7, 2016 at 11:47 am
                 
                 Real respect for the fast answer. Unfortunately, did not help.
                 No results are returned…
              
                 
              2. Mikko Saari says:
                 January 7, 2016 at 11:54 am
                 
                 Your theme has enough modifications in the search results
                 template that making it Relevanssi-compatible will require more
                 work. Unfortunately some themes are like that.
              
                 
              
           
        
     
 60. pirmvien says:
     February 11, 2016 at 12:07 am
     
     Where to change “Search” button name in my language?
     
     Reply
     1. Mikko Saari says:
        February 11, 2016 at 3:17 pm
        
        I don’t know. It’s not coming from Relevanssi, but your theme.
        
        Reply
        
     2. eike says:
        March 9, 2016 at 11:24 am
        
        it is from either searchform.php or, in some cases, in heading.php.
        
        Reply
        
     
 61. Matěj Škarka says:
     April 19, 2016 at 11:42 am
     
     Hi, my search stopped working for some reason… It doesnt show ANY results…
     but it did few days ago. I’m not aware of any changes.
     https://www.autocadblog.cz/?s=DWG&submit=Search
     
     I put this line in my search.php: global $wp_query;
     var_dump($wp_query->query_vars);
     
     And this is the result, but I’m not clever from that:
     [“author_name”]=> string(0) “” [“feed”]=> string(0) “” [“tb”]=> string(0)
     “” [“paged”]=> int(0) [“comments_popup”]=> string(0) “” [“meta_key”]=>
     string(0) “” [“meta_value”]=> string(0) “” [“preview”]=> string(0) “”
     [“sentence”]=> string(0) “” [“title”]=> string(0) “” [“fields”]=> string(0)
     “” [“menu_order”]=> string(0) “” [“category__in”]=> array(0) { }
     [“category__not_in”]=> array(0) { } [“category__and”]=> array(0) { }
     [“post__in”]=> array(0) { } [“post__not_in”]=> array(7) { [0]=> int(889)
     [1]=> int(601) [2]=> int(188) [3]=> int(880) [4]=> int(9) [5]=> int(757)
     [6]=> int(874) } [“post_name__in”]=> array(0) { } [“tag__in”]=> array(0) {
     } [“tag__not_in”]=> array(0) { } [“tag__and”]=> array(0) { }
     [“tag_slug__in”]=> array(0) { } [“tag_slug__and”]=> array(0) { }
     [“post_parent__in”]=> array(0) { } [“post_parent__not_in”]=> array(0) { }
     [“author__in”]=> array(0) { } [“author__not_in”]=> array(0) { }
     [“meta_query”]=> string(0) “” [“posts_per_page”]=> int(-1)
     [“ignore_sticky_posts”]=> bool(false) [“suppress_filters”]=> bool(false)
     [“cache_results”]=> bool(true) [“update_post_term_cache”]=> bool(true)
     [“update_post_meta_cache”]=> bool(true) [“post_type”]=> string(3) “any”
     [“nopaging”]=> bool(true) [“comments_per_page”]=> string(2) “50”
     [“no_found_rows”]=> bool(false) [“search_terms_count”]=> int(1)
     [“search_terms”]=> array(1) { [0]=> string(3) “DWG” }
     [“search_orderby_title”]=> array(1) { [0]=> string(40)
     “acadblogwp_posts.post_title LIKE ‘%DWG%'” } [“order”]=> string(4) “DESC” }
     
     Reply
     1. Matěj Škarka says:
        April 19, 2016 at 11:49 am
        
        Hah, nevermind… I had new plugin from colleague: “Post Types Order”
        And that did it… :-/
        
        Reply
        
     
 62. Nicole DeVries says:
     May 11, 2016 at 2:07 am
     
     I’ve installed Relevanssi and built the index, but I cannot figure out how
     to make a search bar show up on my site anywhere. Any tips?
     
     Reply
     1. Mikko Saari says:
        May 11, 2016 at 5:43 am
        
        Just use the WordPress default search widget.
        
        Reply
        1. Nicole DeVries says:
           May 11, 2016 at 6:37 am
           
           Thanks! That makes sense. It’s working now!
           
           Reply
           
        
     
 63. KevTheSmeg says:
     June 21, 2016 at 3:03 pm
     
     Hi. I’m sure this is a dumb question but I’m new to this and i don’t see
     any difference in the search function am i doing something wrong in the
     code? i just installed the plugin and created the index but the search
     isn’t any different?
     
     Reply
     1. Mikko Saari says:
        June 21, 2016 at 3:42 pm
        
        Your theme is probably incompatible with Relevanssi. You can try
        switching to a default theme for a while – does the search have an
        effect then?
        
        Reply
        1. KevTheSmeg says:
           June 21, 2016 at 3:47 pm
           
           thank you for the really quick reply. I’ve just checked my custom
           mobile menu its working on that but not in desktop. I’m using Labomba
           is there any known issues with this theme do you know?
           
           Reply
           1. Mikko Saari says:
              June 21, 2016 at 3:49 pm
              
              First time I’ve heard of the theme, so I don’t know. Does
              Relevanssi work with one of the default themes? In that case it’s
              a theme incompatibility, which most of the time can be fixed with
              the instructions on this page.
              
              Reply
              1. KevTheSmeg says:
                 June 21, 2016 at 4:13 pm
                 
                 ah right ok. No i cant change my theme because of the one of
                 the links to woocommerce. ill try and redefine the search term
                 for the desktop because i know the mobile menu has a different
                 term to the desktop. once again thank you for the quick reply!
              
                 
              
           
        
     
 64. Varvara Jones says:
     September 21, 2016 at 1:57 am
     
     I am attaching our search.php and I am not at all sure what stopped working
     after the latest update. There’s no query_posts or anything like that, and
     me being a very begginer WP user, I’m at a loss.
     
     Pastebin: http://pastebin.com/rsVyZhLB
     
     Reply
     1. Mikko Saari says:
        September 21, 2016 at 6:44 am
        
        There is no problem with that template. Have you tried switching to one
        of the default themes and disabling other plugins to rule out conflicts?
        
        Reply
        
     
 65. msi says:
     October 12, 2016 at 12:57 pm
     
     Hi. I try to search for a woocommerce article number (sku).
     
     The sku ist saved in a format like this: 978-3-3801-1010-3 but can also be
     shorter for example 971-4-313-334-1. If the user search exactly for this
     string, the product will be displayed. But often the user searches for the
     number without the “-“. Then the product will not be displayed. The
     fuzzy-search is active.
     
     Do you know any workaround, to display the correct product also if the user
     searches for the sku without the “-“?
     
     Reply
     1. Mikko Saari says:
        October 12, 2016 at 1:25 pm
        
        Yes, the solution is here:
        https://www.relevanssi.com/knowledge-base/words-ampersands-cant-found/
        
        Reply
        1. msi says:
           October 12, 2016 at 1:56 pm
           
           Perfect! Thank you!
           
           Reply
           
        
     
 66. Alex says:
     November 7, 2016 at 10:22 pm
     
     Thank you for your great plugin.
     
     I have a plugin (User Gallery Lite for Ultimate Member) and would like to
     use this plugin with Relevanssi plugin but unfortunately Relevanssi plugin
     can’t find this plugin (User Gallery Lite for Ultimate Member) in Indexing
     option table and can’t index my images when I upload them to database. Can
     you please help me to modify your code in order to find the plugin in
     indexing option table?
     Thanks,
     Alex
     
     Reply
     1. Mikko Saari says:
        November 8, 2016 at 5:47 am
        
        Sorry, can’t help you there. If the images are not a custom post type,
        but instead in a separate database table, Relevanssi has no access to
        them, and it’s really difficult to fix.
        
        Reply
        
     
 67. Lexie Vean says:
     December 5, 2016 at 10:47 pm
     
     I am so sorry this is elementary, but I do not know how to get the this
     search functionality on my top navigation bar next to Contact? Any help
     appreciated. I have installed and activated the plug-in.
     
     Reply
     1. Mikko Saari says:
        December 6, 2016 at 5:42 am
        
        Looks like this plugin might help you:
        https://wordpress.org/plugins/bop-search-box-item-type-for-nav-menus/
        
        Reply
        
     
 68. Alex says:
     January 30, 2017 at 8:50 pm
     
     Hi,
     
     I was wondering whether your plugin can index more than 100,000 images? If
     no, what plugins you suggest for large database?
     
     Thanks,
     Alex
     
     Reply
     1. Mikko Saari says:
        January 30, 2017 at 9:02 pm
        
        No, it’s way too much for Relevanssi. Use Solr.
        
        Reply
        
     
 69. Corey Taylor says:
     March 14, 2017 at 8:29 am
     
     How do I fix the search button being misaligned with the text box. I know
     this is something simple but I just don’t know what to do.
     https://uploads.disquscdn.com/images/5a7ef026d93a53c36149a4a1911e1330d04f045e616e01e4afa0d17d219f419e.png
     
     Reply
     1. Mikko Saari says:
        March 14, 2017 at 8:36 am
        
        Can’t really help just based on image; seeing the site and the CSS code
        would help. But this is not Relevanssi-specific, anybody with CSS skills
        can help you with this.
        
        Reply
        
     
 70. Guest 1 says:
     March 29, 2017 at 12:08 pm
     
     How can i give the post title the first priory in the relevanssi order?
     
     Reply
     1. Mikko Saari says:
        March 29, 2017 at 12:27 pm
        
        Increase the title weight in Relevanssi settings.
        
        Reply
        
     
 71. Ben says:
     March 30, 2017 at 7:57 pm
     
     Is there a link to adding images to search return? I am trying to
     differentiate between products and posts, and images would help greatly but
     I can’t get them to populate. And I can’t find a post about this issue.
     
     Reply
     
 72. Ben says:
     March 30, 2017 at 8:04 pm
     
     Is there a link to adding images to search return? I am trying to
     differentiate between products and posts, and images would help greatly but
     I can’t get them to populate. And I can’t find a post about this issue.
     
     Reply
     1. Mikko Saari says:
        March 31, 2017 at 6:47 am
        
        The post type is stored in $post->post_type. You can use that to display
        different images for products and posts.
        
        There’s no documentation about this here, because it’s not a Relevanssi
        issue, but instead depends on your theme.
        
        Reply
        
     
 73. Corbett says:
     May 26, 2017 at 1:50 am
     
     Hi,
     I am having an issue with searches on the front end of our website. When I
     enter the SKU #, description, name, and/or keywords into the product tags,
     Relevanssi usually pulls up the product I am looking for, but if I don’t
     have any tags entered in, it won’t find the product. Usually not even
     close, either. The back end works just fine, but I can’t pull up the
     product I’m looking for on the front end of the website. Short of entering
     tags for every product, I don’t know what to do. Any suggestions?
     
     Reply
     1. Mikko Saari says:
        May 26, 2017 at 5:12 am
        
        Are you sure the search is powered by Relevanssi in the first place? If
        you disable Relevanssi, does that make any difference at all in the
        search?
        
        In order for Relevanssi to find products by SKU, you must adjust
        Relevanssi settings so that the “_sku” custom field is being indexed.
        Have you done that?
        
        Reply
        1. Corbett says:
           May 26, 2017 at 5:51 pm
           
           I wasn’t the one to initially set it up, so I’m not sure what was
           done. I did try disabling it, and re-enabling it, and both did little
           to nothing. How do you adjust the sku custom field?
           
           Reply
           1. Mikko Saari says:
              May 26, 2017 at 7:56 pm
              
              Add “_sku” to the list of custom fields to index, rebuild the
              index. That should do the trick. But disabling Relevanssi should
              modify the search results, if they are powered by Relevanssi, so
              if nothing happens, they’re not.
              
              Reply
              1. Corbett says:
                 May 26, 2017 at 8:49 pm
                 
                 Where would I locate the list of custom fields? Is there any
                 way you can post a screenshot of what you’re talking about? I’m
                 sorry, I am learning about all this as I go. I’m in no way a
                 coding expert. Thanks for your help.
              
                 
              2. Mikko Saari says:
                 May 27, 2017 at 5:09 am
                 
                 Go to the Relevanssi settings page and look at the indexing
                 settings – you’ll find it there.
              
                 
              
           
        
     
 74. Jason W. says:
     September 14, 2017 at 3:39 pm
     
     Hi,
     
     Thanks for the great information and your quick response times. I am using
     a Theme named “Porto” for my woocommerce shop and I don’t think the search
     results page is showing Relevanssi results due to some code on the
     search.php page.
     
     Fixing that is beyond my skill set and I was wonder, do you have any
     recommendations to edit search.php or can help me get this going?
     
     Reply
     1. Mikko Saari says:
        September 14, 2017 at 8:00 pm
        
        Jason, post your search.php to Pastebin or somewhere like that, and I
        can take a look at it to see if there’s something obvious.
        
        Reply
        1. Jason W. says:
           September 14, 2017 at 8:24 pm
           
           Here it is…thank you!
           
           https://pastebin.com/7DfDTu6D
           
           Reply
           1. Mikko Saari says:
              September 14, 2017 at 8:34 pm
              
              Nothing obviously wrong there, though some slightly curious bits.
              But nothing that should prevent the search from working. Does
              disabling Relevanssi change the results at all?
              
              Reply
              
           
        
     
 75. Kathe says:
     November 6, 2017 at 4:14 pm
     
     Hi
     I have problem. Plugin dont show search results.
     Can u help my?
     
     This is my search.php
     https://pastebin.com/ZrKF2G62
     
     Reply
     1. Mikko Saari says:
        November 6, 2017 at 8:41 pm
        
        Kathe, nothing wrong with the template. Do you have a complete index,
        with all the necessary post types indexed?
        
        Reply
        
     
 76. rsk says:
     January 29, 2018 at 3:27 am
     
     Hey,
     
     I’m completely new to wordpress. The guy who built the site has a search
     system already in place. There is a search.php and presumably a
     searchform.php somewhere. I want to replace the current search system with
     your search system. Here is the pastebin of the code in the header menu
     bar, where the search field is located: https://pastebin.com/xdHZh84g
     
     Sorry i can’t be more helpful, i’m very new but eager to learn
     
     Reply
     1. Mikko Saari says:
        January 29, 2018 at 5:36 am
        
        Rsk, just install and activate Relevanssi, that should do the trick.
        
        Reply
        
     
 77. rsk says:
     January 29, 2018 at 12:22 pm
     
     It would seem installing it just makes the search function worse.
     Previously it would just show the page link where the term was found,
     Relevanssi seems to show less results and won’t show any excerpts. It also
     still gives the message from my original search.php if nothing is found.
     
     I’m certain everything is indexed, i’ve tried to deactivating and
     reactivating. Even on the basic settings after just indexing it doesn’t
     seem to work. I have posts, pages and attatchments indexed. When it does
     actually find something it won’t show any excerpts, but it rarely finds
     something.
     
     Thanks so much for the quick reply!
     
     Reply
     1. Mikko Saari says:
        January 29, 2018 at 12:28 pm
        
        Relevanssi uses the same template as your default search, so the look of
        the search results page should not change when activating Relevanssi. If
        it does, then your current search is doing something non-standard and
        needs to be returned to be more in line with the default WP search.
        
        Reply
        
     
 78. michel79 says:
     February 2, 2018 at 11:43 am
     
     Hi
     Installing Relevanssi with WP : quite correct except one point : “no posts
     found” with a research with only a figure.
     For example, a research with only “2” doesn’t work while a research with
     “2cv” works.
     Is there an option I’ve not pointed ?
     Thanks for your response
     
     Reply
     1. Mikko Saari says:
        February 2, 2018 at 12:12 pm
        
        Michel79, Relevanssi has a minimum word length of 3, and won’t search or
        index words shorter than that. See “Advanced indexing options” on the
        Indexing tab. You also need to add a filter function on the hook
        relevanssi_block_one_letter_searches that returns false, if you want to
        allow one-letter searches.
        
        Reply
        1. michel79 says:
           February 2, 2018 at 12:54 pm
           
           OK
           Many thanks
           
           Reply
           
        
     
 79. Jason says:
     February 16, 2018 at 6:39 pm
     
     Is there a way to modify the last ‘SELECT * FROM wp_posts WHERE id IN…’
     query I’ve used relevanssi_query_filter and when I search “fm”, the query
     looks like this:
     
     _________________________________________________________________
     
     SELECT relevanssi.*, relevanssi.title * 5 +
     relevanssi.content * 1 + relevanssi.comment * 0.75 +
     relevanssi.tag * 0.75 + relevanssi.link * 0 +
     relevanssi.author + relevanssi.category * 0.75 + relevanssi.excerpt +
     relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf
     FROM wp_relevanssi AS relevanssi WHERE (relevanssi.term LIKE ‘fm%’ OR
     relevanssi.term_reverse LIKE CONCAT(REVERSE(‘fm’), ‘%’))
     ___________________________________________________________________
     
     With this, when I run the query in workbench, I get 350 rows of info, which
     is great, however on my page, I only get 11 returns, because of that first
     query most of the items are coming from the same page, so it treats it like
     one.
     
     I need to grab the relevanssi.terms column and join that with info from a
     custom table, then have it return with all the data. There doesn’t seem to
     be a hook for that. Any ideas on how this can be done?
     
     Preferably without altering the plugin itself.
     
     Reply
     1. Mikko Saari says:
        February 16, 2018 at 7:27 pm
        
        Jason, I’m not sure I understand what is the problem here. Relevanssi
        may find 350 rows of matches for something, but if those matches are
        within 11 posts, Relevanssi will show 11 results, and there’s no way to
        make it show more, because that’s how Relevanssi works.
        
        “I need to grab the relevanssi.terms column and join that with info from
        a custom table, then have it return with all the data. There doesn’t
        seem to be a hook for that. Any ideas on how this can be done?”
        
        How is this related to the Relevanssi search? If you need to access the
        data for some other purpose, then create a SQL query that does that. But
        if this is related to regular WordPress search, please explain a bit
        what you’re looking for to achieve here. I don’t understand, and can’t
        help you because I don’t know what you are trying to do here.
        
        If you’re talking about the “SELECT * FROM $wpdb->posts WHERE id IN
        ($ids)” query in relevanssi_populate_array(), it can’t be modified,
        because changing how it works would break Relevanssi. It needs to read
        in all the result posts from the database and store them in the
        Relevanssi cache array.
        
        Reply
        
     
 80. Kevin says:
     May 11, 2018 at 5:23 pm
     
     Hi Mikko,
     
     I’m using Elite Masters WordPress theme and I really want to use your
     Search plugin, because it is the best compared to others.
     
     Unfortunately I have problem. When I’m suing this theme the search results
     page doesn’t show any results. I switched back to the default WP theme and
     the search results appear.
     
     I don’t have any coding skills. Can you help me to modify the search.php so
     it works?
     
     Here it is: https://pastebin.com/uNAVK7HX
     Thank you in advance!
     
     Reply
     1. Mikko Saari says:
        May 11, 2018 at 7:44 pm
        
        Kevin, you can try this: https://pastebin.com/ZRaEr9rd
        
        Just make sure you have the original version handy in case it doesn’t
        work. The theme as it is is indeed totally not compatible with
        Relevanssi.
        
        Reply
        1. Kevin says:
           June 20, 2018 at 7:46 pm
           
           Hi Mikko,
           
           I tried your version of search.php but it doesn’t work. I’m getting
           500 Internal Server Error so I reverted the changes
           
           Reply
           1. Mikko Saari says:
              June 20, 2018 at 9:47 pm
              
              Probably some small typo there somewhere. Didn’t notice right away
              where, would take some patient debugging to figure it out.
              
              Reply
              
           
        
     
 81. Jari Väätäinen says:
     May 21, 2018 at 3:06 pm
     
     Hi Mikko,
     I am using Relevanssi with Avada theme. The problem is that the first
     search result is replacing all my upper menu links. You can see the problem
     example here: http://lahde.gtk.fi/?s=Kuopio
     Here you can find Avada search.php file: https://pastebin.com/WqnR7Ahj
     
     Thank You,
     Jari
     
     Reply
     
 82. Stefan Smiljkovic says:
     July 3, 2018 at 5:54 am
     
     Hi Mikko,
     
     I am facing the usual Relevanssi problem. Its not showing any search
     results, since I am using AMP plugin
     https://wordpress.org/plugins/accelerated-mobile-pages/ .
     
     I tried to hack it for last few hours, but this require little bit more PHP
     knowledge.
     
     I think i found right files, so I can list them over here.
     
     This is a loop.php file and i think in there is search template
     https://gist.github.com/shtefcs/a29e6a9ec7bcd095eb6ee313118b4101
     
     And this is search.php, i think its just some function there for search
     form: https://gist.github.com/shtefcs/a2258f34b2d046f353d8a549bb7b32e3
     
     I would really appreciate for your help Mikko. I also believe that your fix
     can be great for AMP plugin compatibility and that you could send PR to
     their github https://github.com/ahmedkaludi/accelerated-mobile-pages
     
     Peace,
     
     Reply
     1. Mikko Saari says:
        July 3, 2018 at 6:20 am
        
        Stefan, I made a suggestion on the loop.php gist. Does that help?
        
        Reply
        1. Stefan Smiljkovic says:
           July 3, 2018 at 6:29 am
           
           Man you are awesome. It worked on first try.
           
           Thank you a lot.
           
           Maybe suggest to AMP guys ur fixes, so Relevanassi become compatible
           with it. AMP is big and will be standard in future.
           
           Peace,
           
           Reply
           1. Mikko Saari says:
              July 3, 2018 at 6:48 am
              
              Stefan, I’ve added a pull request for this. Let’s hope it gets
              accepted.
              
              Reply
              1. Stefan Smiljkovic says:
                 July 3, 2018 at 6:51 am
                 
                 Great, I commented. They should accepted it.
              
                 
              
           
        
     
 83. René Vlak says:
     July 5, 2018 at 6:00 pm
     
     Dear Mikko,
     
     My search page also shows no results with Relevanssi activated. Here is the
     contents of my search.php file: https://pastebin.com/S7FtcV3u
     
     I really hope you can help me out with this!
     
     Reply
     1. Mikko Saari says:
        July 5, 2018 at 7:03 pm
        
        René, there are no problems with your search results template. Do you
        have an index? Are your Relevanssi settings correct? Weights make sense,
        no category restrictions, post types correct?
        
        Reply
        1. René Vlak says:
           July 19, 2018 at 1:58 pm
           
           Hi Mikko,
           
           Sorry it took so long to reply. In the mean time, I have bought the
           Premium version of Relevanssi, but the problem persists. I do have an
           index, and the Relevanssi settings are correct (as far as I can
           tell).
           
           Here is a screenshot of asearch results page (example:
           https://dev-mindthegap.somo.nl/?s=virginia)
           
           1) with Relevanssi deactivated (working) –
           https://rvlak.stackstorage.com/s/wIKHYRaC9DPYo9Q
           2) with Relevanssi activated (empty page) –
           https://rvlak.stackstorage.com/s/mTQJ2IA4VZYmORa
           
           If you need access to the backend for debugging purposes, please let
           me know. I will also put in a regular support request for this.
           
           Reply
           
        
     
 84. René Vlak says:
     July 19, 2018 at 6:17 pm
     
     P.S. I have found the culprit. A long time ago, I added the BuddyPress
     Global Search plugin, and I forgot it was there. When I deactivated it, the
     search page was working properly again. So it was the BuddyPress Global
     Search plugin that conflicted with Relevanssi.
     
     Reply
     
 85. Dale says:
     August 1, 2018 at 4:44 am
     
     Hi, Relevanssi is not working in our site here is the code of my search.php
     https://pastebin.com/SQqihtd0
     
     I already added the code below to my function.php.
     add_filter(‘relevanssi_modify_wp_query’, ‘rlv_meta_fix’, 99);
     function rlv_meta_fix($q) {
     $q->set(‘meta_query’, ”);
     return $q;
     }
     
     Relevanssi setting is also okay.
     
     Any thoughts?
     
     Reply
     1. Mikko Saari says:
        August 1, 2018 at 6:10 am
        
        Dale, your search results template is full of custom MySQL code that
        fetches the results, that’s all overriding what Relevanssi does. In
        order to use Relevanssi, most of that needs to be removed.
        
        Reply
        1. Dale says:
           August 1, 2018 at 6:18 am
           
           Hi, I don’t know what are the codes that need to remove. I’m not a
           programmer as well so I don’t know what to put or remove there. Do
           you know what codes will I need to remove there?
           
           Reply
           1. Mikko Saari says:
              August 1, 2018 at 6:25 am
              
              Sorry, but this is too complicated thing to explain to a
              non-programmer. It would require a very thorough rewrite of the
              whole template file. It’s doing some very unorthodox things with
              the search right now.
              
              Reply
              
           
        
     
 86. Nigel Parry says:
     August 12, 2018 at 12:23 am
     
     The plugin is working fine apart from one aspect, Page 2 of *some* search
     results goes to a 404 Page, despite there still being more posts to show.
     Have you come across this before?
     
     Try clicking the search link below (Website), then go down to “Next Page”
     and click that. 404. What’s super weird is that if you search for anything
     other than Cardwell Higgins, eg. Henry Clive, that second page of results
     works. I can’t figure out for the life of me why.
     
     Reply
     1. Mikko Saari says:
        August 12, 2018 at 3:45 pm
        
        Nigel, can’t tell for sure, but one thing I’ve sometimes seen happen is
        that Relevanssi only finds one page of results, but the paging is based
        on the default WP search, which finds more results for some reason.
        
        Reply
        1. Nigel Parry says:
           August 15, 2018 at 5:30 pm
           
           Thanks Mikko. The thing is that there are definitely more results
           from that artist than contained on the first page. If I disable
           Relevanssi, then I can see them.
           
           Reply
           1. Mikko Saari says:
              August 16, 2018 at 5:44 am
              
              If you add the “Look at the results” step here:
              https://www.relevanssi.com/knowledge-base/debugging-relevanssi-searching-issues/
              
              How many results does that print out?
              
              Reply
              
           
        2. Ben says:
           February 20, 2019 at 4:16 pm
           
           I’m encountering this exact thing myself (paging showing more pages
           than Relevanssi actually returns) – any fix for this scenario?
           
           Reply
           1. Mikko Saari says:
              February 20, 2019 at 8:55 pm
              
              Ben, how is the paging built? It shouldn’t use any custom queries,
              just the normal WP paging functions.
              
              Reply
              
           
        
     
 87. Mike says:
     August 22, 2018 at 5:46 am
     
     Hi Mikko,
     
     Hope you can help? I am a newbie, so please forgive my errors/omissions. I
     installed and activated your plugin. Twice per your debugging instructions.
     The search page is not returning any results. I am happy to buy your
     premium plugin if I can get it to work.
     
     I have two searches:
     1) Blog (http://146.66.101.125/~dandel50/deve/blog/) should only search
     posts
     2) Store (http://146.66.101.125/~dandel50/deve/services/) should only
     search products
     
     I am not sure if your plugin impacts just the blog search or also the
     product search? The product functionality is all WooCommerce. When I
     installed your plugin, I only I used your index functionality (I did not
     configure anything else).
     
     I am using Elementor on the backend and an Astra theme.
     
     I get no search results via relevanssi, although, the image behind the
     search box is dynamic to show the hero image of page’s top post on the Blog
     page and the top product on the Product page and the images change as I use
     search, implying something is happening but just not displaying. Search was
     working before I implemented relevanssi, but it was mixing blog and product
     content together. Hence, the reason I wanted relevanssi (to help me only
     show posts on the blog search and products in the product search).
     
     Can you help?
     
     Thanks,
     Mike
     
     Reply
     1. Mikko Saari says:
        August 22, 2018 at 6:14 am
        
        Mike, Relevanssi will take over both searches: they’re the same search,
        underneath it all.
        
        You’ve got the product search covered: it has the post type restriction
        to the “product” post type. However, your main search has no post type
        restriction, and will then show all posts, including products. If you
        don’t have any pages you want to include in the search, you need to
        restrict the main search to the post type “post”. If you want pages,
        too, then “post,page”. That’s done by adding a hidden input field in the
        search form:
        
        <input type=”hidden” name=”post_type” value=”post,page” />
        
        The default settings are mostly fine, but make sure the “product” post
        type is included in the indexing settings.
        
        Can you show me your search results template? It’s the file search.php
        usually, you can put it in a Pastebin and share the link to me.
        
        Reply
        
     
 88. Mike says:
     August 22, 2018 at 8:30 am
     
     Thanks for the quick reply. I am hesitant to edit PHP. (I am not a
     developer). I have two concerns: (1) future maintenance of wordpress/plugin
     compatibility with the PHP edits and (2) forgetting where the edits were
     made. Any solutions to help with this?
     
     Here is the pastebin:
     https://pastebin.com/7ii2jCUS
     
     Thanks!
     
     Reply
     1. Mikko Saari says:
        August 22, 2018 at 8:47 am
        
        Mike, looks like the theme you’re using is not compatible with
        Relevanssi, or making it compatible would be a really big job.
        
        Reply
        1. Mike says:
           August 23, 2018 at 4:34 am
           
           Thanks, Mikko. Can you tell me what you are seeing that tells you it
           isn’t compatible? I can submit a ticket to the Astra (the theme
           maker). Or, Elementor (the page builder). Thanks!
           
           Reply
           1. Mikko Saari says:
              August 23, 2018 at 5:34 am
              
              It’s the theme, it hides the post loop to some custom code:
              
              It would be possible to make it compatible with Relevanssi, but it
              takes lots of custom modifications.
              
              All Relevanssi wants is a basic loop, but your theme likely has a
              non-basic loop.
              
              Reply
              
           
        
     
 89. Nicole Effendy says:
     August 30, 2018 at 2:40 pm
     
     I do not know, how to install in a theme with visual composer. Can anybody
     help me?
     
     Reply
     1. Mikko Saari says:
        August 30, 2018 at 2:43 pm
        
        Nicole, nothing special in it. Visual Composer should not affect
        Relevanssi installation in any way. Just install the plugin, build an
        index and off you go.
        
        Reply
        
     
 90. Audrey Langue says:
     March 15, 2024 at 6:43 pm
     
     Could someone please explain to me like i’m a three year old what I’m
     looking for and how to change it (regarding the below two paragraphs on
     query posts)
     
     I have the following php search files
     
     public_html/wp-content/upgrade-temp-backup/plugins/elementor-pro/modules/theme-builder/conditions/search.php
     
     public_html/wp-content/upgrade-temp-backup/plugins/elementor-pro/modules/theme-builder/documents/search-results.php
     
     public_html/wp-content/upgrade-temp-backup/plugins/elementor-pro/modules/theme-elements/widgets/search-form.php
     
     public_html/wp-content/upgrade-temp-backup/themes/hello-elementor/template-parts/search.php
     
     public_html/wp-content/themes/hello-elementor/template-parts/search.php
     
     Do I change all of them? And what exactly do I do, please??
     
     Many thanks
     
     “If you’re having problems with Relevanssi, the first step is to check your
     search results page, usually search.php. See if there’s a call to
     query_posts() and if there is, comment it out. In most cases that is enough
     to fix the problem.
     
     It’s not always query_posts(). Appearance of new WP_Query() is another sign
     of trouble, or $wp_query->get_posts();”
     
     Reply
     1. Mikko Saari says:
        March 16, 2024 at 5:07 am
        
        Audrey, you are using Elementor, so none of this applies to you. Your
        problems are caused by something else. Please post a question on the
        Relevanssi support forums describing your problem.
        
        Reply
        
     


LEAVE A REPLY CANCEL REPLY

Are you a Relevanssi Premium customer looking for support? Please use the
Premium support form.

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Save my name, email, and website in this browser for the next time I comment.

Notify me of follow-up comments by email.

Notify me of new posts by email.




BUY PREMIUM

Buy now »

(for other license options, see here)


LICENSE STATUS

Not logged in. Log in to see your license details.

Username or Email Address


Password


Remember Me





SEARCH

Search for: When autocomplete results are available use up and down arrows to
review and enter to go to the desired page. Touch device users, explore by touch
or with swipe gestures.



RECENT POSTS

 * Premium 2.26 / Free 4.23 release notes
 * GeneratePress: Query Loop
 * Year filter from the search query
 * Pin a post for all searches
 * WooCommerce: Aelia Prices by Country product visibility
 * PublishPress Revisions: duplicate posts
 * Korean postpositions
 * Premium 2.25 / Free 4.22 release notes
 * Indexing attachments from File blocks
 * Premium 2.24 / Free 4.21
 * EmbedPress autoembeds
 * Premium 2.23 / Free 4.20
 * WooCommerce: Make Relevanssi notice stock changes
 * Premium 2.22 / Free 4.19
 * Premium 2.21 / Free 4.18.4


POST NAVIGATION

Previous Previous post: Setting post_type to page doesn’t work
Next Next post: Free 2.9.13, Premium 1.7.6

Relevanssi

WordPress search done right!


THE FREE VERSION

Relevanssi at WP.org plugin repository
Relevanssi at Github


RELEVANSSI LIGHT

Relevanssi Light
Relevanssi Light at WP.org plugin repository
Relevanssi Light at Github


RELEVANSSI LIVE AJAX SEARCH

Relevanssi Live Ajax Search
Relevanssi Live Ajax Search at WP.org plugin repository
Relevanssi Live Ajax Search at Github


RESPONSIBILITY

We take corporate responsibility and our environmental impact seriously. Read
our responsibility statement.


 * Github
 * WordPress.org

Copyright 2024 Mikko Saari and Painava sana oy. Privacy policy. Cookie
declaration.