Skip to content

Instantly share code, notes, and snippets.

@msaari
Created March 15, 2017 03:51
Show Gist options
  • Save msaari/810ab433051576bd8c0253406dc6e6fd to your computer and use it in GitHub Desktop.
Save msaari/810ab433051576bd8c0253406dc6e6fd to your computer and use it in GitHub Desktop.
Force wider post type parameter
<?php
/* Add this function to theme functions.php */
add_filter('relevanssi_modify_wp_query', 'rlv_force_post_types');
function rlv_force_post_types($query) {
$query->set('post_types', 'post,page,accommodation,room_type,things_to_do,tour');
return $query;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment