Advertisement
eventsmanager

ical.php per category

Apr 21st, 2024 (edited)
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function em_ical_slug( $args ){
  2. global $wp;
  3. $URL = explode('/', $wp->request );
  4.  
  5. /*
  6. category / category name
  7. sample URL: activiteit/categorie/commissieactiviteit/
  8. */
  9. if ( is_array($URL) ){
  10. $type = ( isset($URL[1]) ) ? $URL[1]:"";
  11. if( $type == 'categorie' || $type == 'categories' ){
  12. $args['category'] = $URL[2];
  13. }
  14. }
  15.  
  16. return $args;
  17. }
  18. add_filter('em_calendar_template_args','em_ical_slug',100,1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement