Title: Filter by host
Last modified: November 2, 2022

---

# Filter by host

 *  Resolved [André](https://wordpress.org/support/users/andrebehrendt/)
 * (@andrebehrendt)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/filter-by-host/)
 * Hello,
    I would like to show all events where the host is either current or a
   specific host. If I enter “current”, the appropriate events are displayed. I 
   enter “1”, corresponding to that of 1. If I enter “current,1”, I don’t get any
   appointments displayed, but I would like to see them from both.`
 * Tahnks
    André

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/filter-by-host/#post-16170535)
 * Thanks for reporting this! I’d consider this a bug, and I’ll look at it for the
   next release. The problem is that My Calendar considers the ‘current’ keyword
   to mean “only the current user”, and doesn’t combine it with other values. For
   immediate use, you could get the current user by using a scripted shortcode in
   a template, e.g.
 *     ```
       $user_id = wp_get_current_user()->ID;
       $hosts   = "$user_id, 1";
       $shortcode = "[my_calendar host='$hosts']";
       echo do_shortcode( $shortcode );
       ```
   
 *  Thread Starter [André](https://wordpress.org/support/users/andrebehrendt/)
 * (@andrebehrendt)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/filter-by-host/#post-16171765)
 * thanks, thats works for my test environment.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Filter by host’ is closed to new replies.

 * ![](https://ps.w.org/my-calendar/assets/icon-256x256.png?rev=1097576)
 * [My Calendar - Accessible Event Manager](https://wordpress.org/plugins/my-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/my-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/my-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/my-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-calendar/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [André](https://wordpress.org/support/users/andrebehrendt/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/filter-by-host/#post-16171765)
 * Status: resolved