Viper007Bond

Untitled

Jun 28th, 2012
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. function ac_search_mod($query) {
  2.     if(is_search()) {
  3.         $ac_tax_query = array(
  4.             array(
  5.                 'taxonomy' => 'ac_state',
  6.                 'terms' => $_GET['funeral-state']
  7.                 'field' => 'name',
  8.             ),
  9.             array(
  10.                 'taxonomy' => 'ac_city',
  11.                 'terms' => $_GET['funeral-city'],
  12.                 'field' => 'name',
  13.             )
  14.         );
  15.  
  16.         $query->set('tax_query', $ac_tax_query);
  17.     }
  18. }
  19. add_action('pre_get_posts', 'ac_search_mod');
Advertisement
Add Comment
Please, Sign In to add comment