Guest User

Untitled

a guest
Apr 26th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. if (isset($_GET['filter_category']) && !empty($_GET['filter_category']))
  2. {
  3. $category = $_GET['filter_category'];
  4. }
  5.  
  6. else
  7. {
  8. $category = 'networks';
  9. }
  10.  
  11. if (isset($_GET['filter_network']) && !empty($_GET['filter_network']))
  12. {
  13. $network = $_GET['filter_network'];
  14. }
  15.  
  16. else
  17. {
  18. $network = '';
  19. }
  20.  
  21. if (isset($_GET['filter_recurring']) && !empty($_GET['filter_recurring']))
  22. {
  23. $recurring = $_GET['filter_recurring'];
  24. }
  25.  
  26. else
  27. {
  28. $recurring = '';
  29. }
  30.  
  31. 'post_type' => 'post',
  32. 'posts_per_page' => -1,
  33. 'tax_query' => array(
  34. 'relation' => 'OR',
  35. array(
  36. 'taxonomy' => 'category',
  37. 'terms' => array( $category ),
  38. 'field' => 'slug',
  39. 'operator' => 'IN',
  40. ),
  41.  
  42. array(
  43. 'taxonomy' => 'network',
  44. 'terms' => array( $network ),
  45. 'field' => 'slug',
  46.  
  47. ),
  48.  
  49. array(
  50. 'taxonomy' => 'recurring',
  51. 'terms' => array( $recurring ),
  52. 'field' => 'slug',
  53.  
  54. ),
  55.  
  56. ),
Add Comment
Please, Sign In to add comment