• Hi Ross,
    Is there any way to only output events with a location?

    At the moment I am using the if-location to only display events with a location,
    but all the events which don’t have a location show up in the html as empty <li> tags.

    I was thinking that I could try to modify the code myself, but I’m not sure where to start and wether this is big task or not. I have bit php-experience.

    I only want to do this for the calendar list view, and not the widgets.

    If you have any suggestions I would be very thankful!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Ross Hanney

    (@rosshanney)

    Hello,

    To do this, you’d need to do something like the following:

    Add a get_location function (within the GCE_Event class) to google-calendar-events/inc/gce-event.php:

    function get_location() {
    	return $this->location;
    }

    Then, alter lines 333 to 342 of google-calendar-events/inc/gce-parser.php so that they read like this.

    That should prevent events without a location from appearing in lists.

    It’s a very messy hack though! I’m looking into ways of making this sort of thing much less painful.

    Ross.

    Thread Starter Paul

    (@pling1)

    Thanks you so much!! This works perfectly.
    You are the best Ross!

    Is it possible to donate for the development of this plugin?

    Thanks,
    Paul

    Plugin Contributor Ross Hanney

    (@rosshanney)

    I’m glad that did the trick.

    There is a donation link here, but don’t feel obliged to donate, I’m happy to help!

    Ross.

    Thread Starter Paul

    (@pling1)

    I made a small donation because I’m using this plugin a lot, and you have been very helpful so you really deserve it!

    Paul

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Only output events with location’ is closed to new replies.