Advertisement
mbis

Fix term query variable

May 8th, 2019
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function pm_fix_term_pages($query) {
  2.     if(!empty($query['taxonomy']) && !empty($query['term'])) {
  3.         unset($query['term']);
  4.         unset($query['taxonomy']);
  5.     }
  6.     return $query;
  7. }
  8. add_filter('request', 'pm_fix_term_pages', 9999);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement