Title: Incendiary's Replies | WordPress.org

---

# Incendiary

  [  ](https://wordpress.org/support/users/incendiary/)

 *   [Profile](https://wordpress.org/support/users/incendiary/)
 *   [Topics Started](https://wordpress.org/support/users/incendiary/topics/)
 *   [Replies Created](https://wordpress.org/support/users/incendiary/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/incendiary/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/incendiary/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/incendiary/engagements/)
 *   [Favorites](https://wordpress.org/support/users/incendiary/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[Relevanssi - A Better Search] [Plugin: Relevanssi – A Better Search] Searching by taxonomy term](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-searching-by-taxonomy-term/)
 *  Thread Starter [Incendiary](https://wordpress.org/support/users/incendiary/)
 * (@incendiary)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-searching-by-taxonomy-term/#post-3109266)
 * Okay, we’ve done a little digging into the code and come up with these two issues.
   Firstly:
 * **Search.php line 179 produces: **
    `SELECT term_taxonomy_id FROM wp_terms JOIN
   wp_term_taxonomy USING(term_id) WHERE slug LIKE '%books%' AND taxonomy LIKE '
   product_type'`
 * I’ve no idea why this is using wildcard LIKE queries, however because we have
   terms of `books` and `ebooks` this is only working for us because they come out
   of the database in the right order. If we’d added the terms in another order 
   this would probably be broken.
 * **Search.php line 306:** This is where the problem I describe above occurs:
    `
   if (is_array($taxonomy))`
 * This isn’t evaluating to true so the taxonomy request is not being added to the
   WHERE of the search query
 * So, we’ve added a new section underneath
    `elseif (is_numeric($taxonomy) && $
   taxonomy > 0)` to check to see if it’s actually a number rather than an array.
   Whether this is the best way to deal with that, or why `$taxonomy` isn’t an array
   I don’t know – however that’s how we’ve fixed it!
 * Hope this helps!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[Relevanssi - A Better Search] [Plugin: Relevanssi – A Better Search] Searching by taxonomy term](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-searching-by-taxonomy-term/)
 *  Thread Starter [Incendiary](https://wordpress.org/support/users/incendiary/)
 * (@incendiary)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-searching-by-taxonomy-term/#post-3109254)
 * Hi Mikko – would it help if you could access the install’s admin panel? I can’t
   provide the URL on here but I could send you across some details via e-mail? 
   Thanks for your help so far!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[Relevanssi - A Better Search] [Plugin: Relevanssi – A Better Search] Searching by taxonomy term](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-searching-by-taxonomy-term/)
 *  Thread Starter [Incendiary](https://wordpress.org/support/users/incendiary/)
 * (@incendiary)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-searching-by-taxonomy-term/#post-3109236)
 * Yeah, very sure. Deactivating the plugin changes the search results and I also
   have features like excluding by tag and weights working so I’m definitely getting
   back data from Relevanssi.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[Relevanssi - A Better Search] [Plugin: Relevanssi – A Better Search] Searching by taxonomy term](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-searching-by-taxonomy-term/)
 *  Thread Starter [Incendiary](https://wordpress.org/support/users/incendiary/)
 * (@incendiary)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-searching-by-taxonomy-term/#post-3109234)
 * Hi Mikko,
 * Thanks for your reply – unfortunately that URL doesn’t restrict the search either.
   Could there be some setting that I’ve missed? Either in the creation of the taxonomy
   or within Relevanssi?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[Relevanssi - A Better Search] [Plugin: Relevanssi – A Better Search] Searching by taxonomy term](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-searching-by-taxonomy-term/)
 *  Thread Starter [Incendiary](https://wordpress.org/support/users/incendiary/)
 * (@incendiary)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-relevanssi-a-better-search-searching-by-taxonomy-term/#post-3109182)
 * Hmm, that doesn’t seem to work either. This is what I did:
 * Applied a custom taxonomy to Pages.
    Set a page to use a term from that taxonomy.
   Reindexed. Tried a search like: ?s=destination&product_type=books
 * The results don’t change with the addition of the product_type=books in the URL
   🙁

Viewing 5 replies - 1 through 5 (of 5 total)