Title: cgroot's Replies | WordPress.org

---

# cgroot

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] have_posts() is set to true when the search result should be zero, and all posts](https://wordpress.org/support/topic/have_posts-is-set-to-true-when-the-search-result-should-be-zero-and-all-posts/)
 *  [cgroot](https://wordpress.org/support/users/cgroot/)
 * (@cgroot)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/have_posts-is-set-to-true-when-the-search-result-should-be-zero-and-all-posts/#post-15995578)
 * [@msaari](https://wordpress.org/support/users/msaari/), I deactivated the S&F
   plugin and it worked correctly, so I knew it had to do something with the connection
   between Relevanssi and S&F. So after much trial and error, I finally figured 
   out that it was the `Force is_search to always be true?` setting under the advanced
   settings of S&F. When I deactivated that, it started to work correctly. So all
   that to say, I am set now. Appreciate your recommendation as well as the quick
   response. 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] have_posts() is set to true when the search result should be zero, and all posts](https://wordpress.org/support/topic/have_posts-is-set-to-true-when-the-search-result-should-be-zero-and-all-posts/)
 *  [cgroot](https://wordpress.org/support/users/cgroot/)
 * (@cgroot)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/have_posts-is-set-to-true-when-the-search-result-should-be-zero-and-all-posts/#post-15992923)
 * Hi [@msaari](https://wordpress.org/support/users/msaari/), I am running into 
   the exact same issue where the page shouldn’t be displaying any posts and it 
   displays all the posts instead. I have read over the above code recommendations
   and it still isn’t working for me. When I look at the MySQL query with Query 
   Monitor, below is what I get returned.
 *     ```
       SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 500 + relevanssi.content * 1 + relevanssi.comment * 1 + relevanssi.tag * 1 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 1 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf 
       FROM wp_relevanssi AS relevanssi 
       WHERE relevanssi.term = 'asdfasdf' 
       AND ( relevanssi.doc IN ( 
   
       SELECT DISTINCT(posts.ID) 
       FROM wp_posts AS posts 
       WHERE posts.post_type IN ('page', 'professors', 'conversations', 'sfwd-courses', 'groups') ) ) 
       AND ((relevanssi.doc IN (
   
       SELECT DISTINCT(posts.ID) 
       FROM wp_posts AS posts 
       WHERE posts.post_status IN ('publish'))) OR (doc = -1)) 
       ORDER BY tf DESC 
       LIMIT 500
       ```
   
 * I also looked at how many rows the `SELECT COUNT(DISTINCT...)` queries have in
   the Query Monitor and both the first and second ones are at 0.
 * I did some further code checking and ran this filter
 *     ```
       add_filter( 'relevanssi_results', 'rlv_check_results' );
       function rlv_check_results( $results ) {
           var_dump( $results );
           exit();
       }
       ```
   
 * which returned `array(0) { }`
 * And also checked this filter
 *     ```
       add_filter( 'relevanssi_modify_wp_query', 'rlv_check_parameters' );
       function rlv_check_parameters( $query ) {
           var_dump( $query-query_vars );
           exit();
       }
       ```
   
 * which returned `int(1)`, not sure if this is the correct response or not.
 * I have tried to limit it down to only one post type, and it still doesn’t work
   correctly. I also deactivated Relevanssi and only used the Search and Filter 
   Pro functionality and it worked correctly. So if you have any ideas or things
   I could try, any kind of help would be much appreciated!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[GamiPress - LearnDash integration] LearnDash Groups](https://wordpress.org/support/topic/learndash-groups/)
 *  Thread Starter [cgroot](https://wordpress.org/support/users/cgroot/)
 * (@cgroot)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/learndash-groups/#post-13975853)
 * [@flabernardez](https://wordpress.org/support/users/flabernardez/) – Just saw
   the plugin update come through with the group feature added onto it!! Really 
   appreciate you guys adding that so quickly!! It works great!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[GamiPress - LearnDash integration] LearnDash Groups](https://wordpress.org/support/topic/learndash-groups/)
 *  Thread Starter [cgroot](https://wordpress.org/support/users/cgroot/)
 * (@cgroot)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/learndash-groups/#post-13943872)
 * Gotcha, okay! I appreciate you replying and letting me know! Yeah it’d be a very
   helpful feature to have and I look forward to maybe seeing it as a future improvement.
 * Thanks and have a great day as well!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[GamiPress - LearnDash integration] LearnDash Groups](https://wordpress.org/support/topic/learndash-groups/)
 *  Thread Starter [cgroot](https://wordpress.org/support/users/cgroot/)
 * (@cgroot)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/learndash-groups/#post-13942918)
 * [@rubengc](https://wordpress.org/support/users/rubengc/)
    [@flabernardez](https://wordpress.org/support/users/flabernardez/)
    -  This reply was modified 5 years, 4 months ago by [cgroot](https://wordpress.org/support/users/cgroot/).

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