Title: if-not-location
Last modified: August 22, 2016

---

# if-not-location

 *  Resolved [jhnfhth](https://wordpress.org/support/users/jhnfhth/)
 * (@jhnfhth)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/if-not-location/)
 * I very much appreciate the effort that is going in to getting this plugin fully
   functional again ! I’m wondering if there is a solution to this little problem.
 * When displaying a gcal feed as a widget, I prefer to keep the display as brief
   as possible, and only display the date, event title and the location. Normally
   that works very well, as most events have a location – so I like to have the 
   map link displayed too.
    So here’s the event builder code (with some important
   blank lines removed)
 * [if-not-all-day][start-time]
    [/if-not-all-day] [event-title] [if-location] [
   location] [maps-link newwindow=”true”]Map[/maps-link] [/if-location]
 * However, a few of our events do not have a location – they are just markers in
   the diary. For these, I do not wish to have the map link.
 * One solution occurred to me. If I could not fill anything in on Google Calendar
   for the location and then trap the events in the Gcal feed, that do not have 
   a location, I could display the description instead. But for that, I would need
   an [else] command or a [if-not-location] command.
 * Failing all of that, I’ll just set the location to be the middle of the Atlantic.
   No-one will go there by mistake.
 * [https://wordpress.org/plugins/google-calendar-events/](https://wordpress.org/plugins/google-calendar-events/)

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

 *  Plugin Contributor [Nick Young](https://wordpress.org/support/users/nickyoung87/)
 * (@nickyoung87)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/if-not-location/#post-5530640)
 * > Failing all of that, I’ll just set the location to be the middle of the Atlantic.
   > No-one will go there by mistake.
 * That made me laugh 🙂
 * So what you are suggesting is a little more flexibility by adding some kind of
   shortcode that can be used as an “else”? Am I understanding correctly?
 *  Thread Starter [jhnfhth](https://wordpress.org/support/users/jhnfhth/)
 * (@jhnfhth)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/if-not-location/#post-5530642)
 * Thanks for the reply Nick.
 * Yes – I was wondering if something like that was available. Perhaps an [else]
   option or a ‘not’ operator or a [if-not-location] test.
 * so something that would have the effect of either:
 * [if-location]
    [location] [maps-link newwindow=”true”]Map[/maps-link] [else] [
   description] [/if-location]
 * or:
    [if-location] [location] [maps-link newwindow=”true”]Map[/maps-link] [/if-
   location]
 * [if-not-location]
    [description] [/if-not-location]
 *  Plugin Contributor [Nick Young](https://wordpress.org/support/users/nickyoung87/)
 * (@nickyoung87)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/if-not-location/#post-5530735)
 * [@jhnfhth](https://wordpress.org/support/users/jhnfhth/),
 * I like the idea. I checked and we don’t have that available currently so it is
   something we would need to add in.
 * I will discuss this one with Phil, but on a side note you should also add it 
   to our public roadmap (feature request tracker) on Trello: [https://trello.com/b/ZQSzsarY](https://trello.com/b/ZQSzsarY)
 * Thanks!

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

The topic ‘if-not-location’ is closed to new replies.

 * ![](https://ps.w.org/google-calendar-events/assets/icon-256x256.png?rev=1263960)
 * [Simple Calendar - Google Calendar Plugin](https://wordpress.org/plugins/google-calendar-events/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-calendar-events/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-calendar-events/)
 * [Active Topics](https://wordpress.org/support/plugin/google-calendar-events/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-calendar-events/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-calendar-events/reviews/)

## Tags

 * [else](https://wordpress.org/support/topic-tag/else/)
 * [map](https://wordpress.org/support/topic-tag/map/)

 * 3 replies
 * 2 participants
 * Last reply from: [Nick Young](https://wordpress.org/support/users/nickyoung87/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/if-not-location/#post-5530735)
 * Status: resolved