Title: Using plugin for native searches
Last modified: January 30, 2020

---

# Using plugin for native searches

 *  Resolved [lwillisjhls](https://wordpress.org/support/users/lwillisjhls/)
 * (@lwillisjhls)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/using-plugin-for-native-searches/)
 * Since the default search in WordPress is lacking, I wanted to know if the Display
   Posts plugin has any effect on the general search option when installed, or is
   it only for adding a shortcode to a specific page? I need to include events in
   my search (using Events Manager), but I don’t need to include past events. (I
   would also like to hide future events that are past 2-3 month away, if possible.)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fusing-plugin-for-native-searches%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/using-plugin-for-native-searches/#post-12456495)
 * Display Posts does not affect the standard WordPress site search. You might check
   with Events Manager for the code to exclude past events from site search.
 * Here’s an article I wrote on [customizing the WordPress query](https://www.billerickson.net/customize-the-wordpress-query/).
   You’ll want to do something like this:
 *     ```
       add_action( 'pre_get_posts', 'be_event_search_query' );
       function be_event_search_query( $query ) {
       	if( $query->is_main_query() && ! is_admin() && $query->is_search() ) {
   
       		// Events Manager query customization goes here
       	}
       }
       ```
   
 *  Thread Starter [lwillisjhls](https://wordpress.org/support/users/lwillisjhls/)
 * (@lwillisjhls)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/using-plugin-for-native-searches/#post-12457134)
 * Thanks. I’ve reached out to Events Manager in hopes of getting some insight.

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

The topic ‘Using plugin for native searches’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

## Tags

 * [recurring events](https://wordpress.org/support/topic-tag/recurring-events/)
 * [search results](https://wordpress.org/support/topic-tag/search-results/)

 * 2 replies
 * 2 participants
 * Last reply from: [lwillisjhls](https://wordpress.org/support/users/lwillisjhls/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/using-plugin-for-native-searches/#post-12457134)
 * Status: resolved