{"id":3057,"date":"2017-03-03T13:07:34","date_gmt":"2017-03-03T13:07:34","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=3057"},"modified":"2021-12-27T10:22:06","modified_gmt":"2021-12-27T10:22:06","slug":"addevent","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/addevent\/","title":{"rendered":"Adding an Event to a Calendar"},"content":{"rendered":"<p>I wanted to add a widget to a wordpress web article that allowed readers to add the event to their calendars. I found the site called, &#8220;<a href=\"https:\/\/www.addevent.com\/\">AddEvent<\/a>&#8220;. Fabulous. Proving that doing one thing well is all a web service has to do. <!--more--><\/p>\n<p>This page records how I implemented this, and has an example event and widget.<\/p>\n<p>The implementation comes in two parts, the reference to a script, which I would <acronym title=\"but not this time, see below, their documentation describes the location of the script URL as best located before the &lt;\/BODY&gt; tag; this is one of those should\/must choices where natural English speakers get it wrong.\">normally put in the HEAD section<\/acronym> and the definition of the event which is HTML and needs to be located where you need the button\/widget i.e. within the Post\/Page content. I have placed the event definition into a code snip aka a custom field.<\/p>\n<p><div title=\"Add to Calendar\" class=\"addeventatc\">\r\n    Add to Calendar\r\n    <span class=\"start\">30\/03\/2017 07:00 PM<\/span>\r\n    <span class=\"end\">30\/03\/2017 09:00 PM<\/span>\r\n    <span class=\"timezone\">Europe\/London<\/span>\r\n    <span class=\"title\">End of the 1st Quarter<\/span>\r\n    <span class=\"description\">An unreal event for testing Add Event<BR>\r\nDate 30th March 2017 7pm. <\/span>\r\n    <span class=\"location\">Trafalgar Sq., London, UK<\/span>\r\n    <span class=\"organizer\">Nne<\/span>\r\n    <span class=\"organizer_email\">N\/A<\/span>\r\n<!---    <span class=\"facebook_event\">T.B.C.<\/span> --->\r\n    <span class=\"all_day_event\">false<\/span>\r\n    <span class=\"date_format\">DD\/MM\/YYYY<\/span>\r\n    <span class=\"client\">aHNypeIjCzZMhgHEImya26521<\/span>\r\n<\/div><\/p>\n<p>When implementing this in wordpress, the javascript reference needs to be located as near but before the &lt;\/BODY&gt; tag. In my case I needed to edit the footer.php file, which meant copying the footer.php file to the child theme in the case of this wiki and creating a child theme for ello.davelevy.info which uses the <strong>minnow<\/strong> theme.<\/p>\n<p>N.B. This widget implementation does not offer a Facebook event since it needs a source and I have not set one up.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to add a widget to a wordpress web article that allowed readers to add the event to their calendars. I found the site called, &#8220;AddEvent&#8220;. Fabulous. Proving that doing one thing well is all a web service has to do.<\/p>\n","protected":false},"author":1,"featured_media":2696,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[3,584],"tags":[1091,1090,911,28],"class_list":["post-3057","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","category-wordpress-technology","tag-add-event","tag-calendar","tag-technology","tag-wordpress"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2015\/06\/calendar1-w640.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/3057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=3057"}],"version-history":[{"count":3,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/3057\/revisions"}],"predecessor-version":[{"id":6112,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/3057\/revisions\/6112"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/2696"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=3057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=3057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=3057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}