Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created February 4, 2021 16:02
Show Gist options
  • Save jchristopher/8f23bc5b1e037394a18540b849e3adfe to your computer and use it in GitHub Desktop.
Save jchristopher/8f23bc5b1e037394a18540b849e3adfe 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