{"id":3057,"date":"2017-03-03T13:07:34","date_gmt":"2017-03-03T13:07:34","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=3057"},"modified":"2017-03-03T13:07:34","modified_gmt":"2017-03-03T13:07:34","slug":"addevent","status":"publish","type":"post","link":"https:\/\/davelevy.info\/prototype\/2017\/03\/03\/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--><br \/>\nThis page records how I implemented this, and has an example event and widget.<br \/>\nThe 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.<br \/>\n%CODE1%<br \/>\nWhen 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.<br \/>\nN.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":{"footnotes":"","_share_on_mastodon":"0"},"categories":[27,34],"tags":[86,242,1513,1697],"class_list":["post-3057","post","type-post","status-publish","format-standard","hentry","category-technology","category-wordpress-technology","tag-add-event","tag-calendar","tag-technology","tag-wordpress"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/davelevy.info\/prototype\/wp-json\/wp\/v2\/posts\/3057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/prototype\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/prototype\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/prototype\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/prototype\/wp-json\/wp\/v2\/comments?post=3057"}],"version-history":[{"count":0,"href":"https:\/\/davelevy.info\/prototype\/wp-json\/wp\/v2\/posts\/3057\/revisions"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/prototype\/wp-json\/wp\/v2\/media?parent=3057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/prototype\/wp-json\/wp\/v2\/categories?post=3057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/prototype\/wp-json\/wp\/v2\/tags?post=3057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}