Skip to content

Instantly share code, notes, and snippets.

@jeffikus jeffikus/functions.php
Last active Dec 10, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.