Skip to content

Instantly share code, notes, and snippets.

@searchwpgists
Created February 8, 2022 13:42
Show Gist options
  • Select an option

  • Save searchwpgists/d1b4b1c24290a0e80bc45ed1af210cfd to your computer and use it in GitHub Desktop.

Select an option

Save searchwpgists/d1b4b1c24290a0e80bc45ed1af210cfd to your computer and use it in GitHub Desktop.
Customize the SearchWP Engine used for Divi Search Results Template
<?php
// Use `supplemental` Engine for Divi Search Results Templates.
// @link https://searchwp.com/documentation/knowledge-base/divi/
add_filter( 'searchwp\integration\pagebuilder\engine', function( $engine, $params ) {
if ( 'divi' === $params['context'] ) {
$engine = 'supplemental';
}
return $engine;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment