This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the search module of divi adds some hidden fields into the search form, | |
// so you get some (maybe) unwanted additional queries in your search result url. | |
// field names and values may vary depending on module settings | |
function remove_hidden_fields_from_search_module($output, $tag) { | |
// only for Divi search module | |
if ($tag === 'et_pb_search') { | |
// remove hidden fields | |
$output = preg_replace('/<input type="hidden" name="et_pb_searchform_submit" value="et_search_proccess" \/>/', '', $output); | |
$output = preg_replace('/<input type="hidden" name="et_pb_include_posts" value="yes" \/>/', '', $output); |