Skip to content

Disabling Site Search

Matt Boynes edited this page May 18, 2017 · 2 revisions

When SearchPress is active and content indexed, site search is automatically upgraded to use Elasticsearch. If you want to use SearchPress but do not want to replace site search to use Elasticsearch, there are two ways to accomplish that:

  1. Before init has run, the preferred route is:

    remove_action( 'after_setup_theme', 'SP_Integration', 30 );
  2. After init has run:

    if ( class_exists( 'SP_Integration' ) ) {
    	SP_Integration()->remove_hooks();
    }