Title: WordPress search bug
Last modified: August 30, 2016

---

# WordPress search bug

 *  Resolved [Carl Gordon](https://wordpress.org/support/users/two-point-zero/)
 * (@two-point-zero)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/)
 * Hi, when I add the events to the WordPress native search using either the pre_get_posts
   filter, or using a search plugin to expand the search, it breaks the search… 
   it will only show one event in the search results and no results for posts or
   pages.
 * [https://wordpress.org/plugins/the-events-calendar/](https://wordpress.org/plugins/the-events-calendar/)

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

 *  Plugin Contributor [Brian](https://wordpress.org/support/users/brianjessee/)
 * (@brianjessee)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/#post-6696442)
 * Hi,
 * Thanks for trying our out plugin.
 * I can try to help here.
 * Are you able to provide the coding you used for this?
 * It is hard to tell what is going on without seeing it ourselves.
 * Thanks
 *  Thread Starter [Carl Gordon](https://wordpress.org/support/users/two-point-zero/)
 * (@two-point-zero)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/#post-6696449)
 * I first used WP Extend Search plugin and when that didn’t work I used the following
   code in my functions.php
 *     ```
       function filter_search($query) {
           if ($query->is_search) {
           $query->set('post_type', array('post', 'page', 'tribe_events'));
           };
           return $query;
       };
       add_filter('pre_get_posts', 'filter_search');
       ```
   
 *  Thread Starter [Carl Gordon](https://wordpress.org/support/users/two-point-zero/)
 * (@two-point-zero)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/#post-6696451)
 * I’ve just tried it with a different installation of WordPress and it looks to
   be working. Now the hunt is on to see what’s in my theme or plugins that’s breaking
   the search
 * Thanks
 *  Plugin Contributor [Brian](https://wordpress.org/support/users/brianjessee/)
 * (@brianjessee)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/#post-6696452)
 * Hi,
 * Thanks for that.
 * I tried with that coding and was not able to reproduce the error.
 * I did a search and it returned events, posts, and pages in the search.
 * It sounds like it could be a conflict somewhere.
 * Can you please follow our testing for conflicts guide:
 * [https://theeventscalendar.com/knowledgebase/testing-for-conflicts/](https://theeventscalendar.com/knowledgebase/testing-for-conflicts/)
 * And see if that can narrow down the cause of this.
 * Thanks
 *  Thread Starter [Carl Gordon](https://wordpress.org/support/users/two-point-zero/)
 * (@two-point-zero)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/#post-6696458)
 * I found the error. There was a problem with my loop in the search.php. Sorry 
   for the inconvenience – I should have checked the theme first. I will give your
   plugin a good rating 🙂
 *  Thread Starter [Carl Gordon](https://wordpress.org/support/users/two-point-zero/)
 * (@two-point-zero)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/#post-6696459)
 * Now, if I could only get it to return one result for reoccurring events.
 *  Plugin Contributor [Brian](https://wordpress.org/support/users/brianjessee/)
 * (@brianjessee)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/#post-6696571)
 * Glad you found the conflict and thanks for the review!
 * For recurring events if you add this to the query it might only return one instance
   of the series:
 * `$query->set('tribeHideRecurrence', TRUE};`
 *  Thread Starter [Carl Gordon](https://wordpress.org/support/users/two-point-zero/)
 * (@two-point-zero)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/#post-6696615)
 * Unfortunately that didn’t work. Thanks for the help.
 *  [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * (@cliffpaulick)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/#post-6696660)
 * You may find the info at this thread helpful: [https://theeventscalendar.com/support/forums/topic/tribehiderecurrence1-in-list-view-link/](https://theeventscalendar.com/support/forums/topic/tribehiderecurrence1-in-list-view-link/)
 * While we do want to make sure we’re serving everyone as best we can, we’re also
   limited here at the dot-org forum to only providing support for bugs in the plugin
   codebase (as outlined in the forum guidelines that exist as a [sticky post at the front page](http://wordpress.org/support/topic/welcome-the-events-calendar-users-read-this-first)).
   It looks like the issue you’re reporting here unfortunately falls outside that
   scope. We want to do our best to get you sorted, though, and so here are some
   resources that might be helpful:
    - [Themer’s Guide](http://m.tri.be/hf) – provides an overview of how to customize
      the plugin’s front-end appearance.
    - [Tutorials](http://m.tri.be/he) – useful tips and tricks for changing how 
      the plugin looks and behaves.
    -  – provides an overview of the classes and functions in each plugin
 * Good luck, and thanks for using The Events Calendar!

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

The topic ‘WordPress search bug’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-search-bug-1/#post-6696660)
 * Status: resolved