Skip to content

Instantly share code, notes, and snippets.

@jeffikus
Last active December 10, 2015 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffikus/9dbe52ea3f98f0c167c2 to your computer and use it in GitHub Desktop.
Save jeffikus/9dbe52ea3f98f0c167c2 to your computer and use it in GitHub Desktop.
IDX fix
<?php
add_filter( 'woo_template_parts', 'idx_search_fix', 1 );
function idx_search_fix( $templates ) {
$options = get_option('fmc_settings');
$page_id = absint( $options['destlink'] );
if ( is_page( $page_id ) && isset( $templates[2] ) ) {
unset($templates[2]);
$templates = array_values($templates);
}
return $templates;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment