{"id":1012614,"date":"2015-10-08T04:56:24","date_gmt":"2015-10-08T11:56:24","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/"},"modified":"2015-10-09T15:24:42","modified_gmt":"2015-10-09T22:24:42","slug":"link-back-to-facebook-event","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/","title":{"rendered":"Link Back To Facebook Event"},"content":{"rendered":"<p>I know this has been covered before and using the link below I attempted to use the code provided in a previous post<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"iBONzIhuvn\"><p><a href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/facebook-event-times-and-link-back-to-event\/\">Facebook Event Times and Link Back To Event<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Facebook Event Times and Link Back To Event&#8221; &#8212; \" src=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/facebook-event-times-and-link-back-to-event\/embed\/#?secret=625WqAaEJ1#?secret=iBONzIhuvn\" data-secret=\"iBONzIhuvn\" width=\"580\" height=\"327\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>When I copy and paste into the functions.php and reload a single events page and doesn&#8217;t load.  With all the updates to The Events Calendar and Facebook Import, does this code snippet still function?<\/p>\n<pre><code>\/\/ Try to add a link to the FB event pages right before the content\nadd_action( &#039;tribe_events_single_event_before_the_content&#039;, &#039;link_to_fb_event&#039; );\n \nfunction link_to_fb_event() {\n    \/\/ Check if the event is associated with a Facebook event\n    $fbid = tribe_get_event_meta( get_the_ID(), &#039;_FacebookID&#039; );\n    if ( empty( $fbid ) ) return;\n \n    \/\/ Form and display a link to the FB event page if so\n    $fburl = esc_url( &quot;&lt;a href=&quot;http:\/\/facebook.com\/events\/$fbid\/&amp;quot&quot; rel=&quot;nofollow&quot;&gt;http:\/\/facebook.com\/events\/$fbid\/&amp;quot&lt;\/a&gt;; );\n    echo &#039;&lt;a href=&quot;&#039; . $fburl . &#039;&quot;&gt;See this event on Facebook&lt;\/a&gt;&#039;;\n}<\/code><\/pre>\n<p>Is there new code that will correct this or a function in the current release that I might be overlooking<\/p>\n<p>Thanks for your time<br \/>\nBrandon<\/p>\n","protected":false},"template":"","class_list":["post-1012614","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Link Back To Facebook Event -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Link Back To Facebook Event -\" \/>\n<meta property=\"og:description\" content=\"I know this has been covered before and using the link below I attempted to use the code provided in a previous post Facebook Event Times and Link Back To Event When I copy and paste into the functions.php and reload a single events page and doesn&#8217;t load. With all the updates to The Events [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-10-09T22:24:42+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/\",\"name\":\"Link Back To Facebook Event -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-10-08T11:56:24+00:00\",\"dateModified\":\"2015-10-09T22:24:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Aggregator\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/event-aggregator\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Link Back To Facebook Event\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Link Back To Facebook Event -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/","og_locale":"en_US","og_type":"article","og_title":"Link Back To Facebook Event -","og_description":"I know this has been covered before and using the link below I attempted to use the code provided in a previous post Facebook Event Times and Link Back To Event When I copy and paste into the functions.php and reload a single events page and doesn&#8217;t load. With all the updates to The Events [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/","article_modified_time":"2015-10-09T22:24:42+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/","name":"Link Back To Facebook Event -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-10-08T11:56:24+00:00","dateModified":"2015-10-09T22:24:42+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/link-back-to-facebook-event\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Event Aggregator","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/event-aggregator\/"},{"@type":"ListItem","position":5,"name":"Link Back To Facebook Event"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1012614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1012614\/revisions"}],"predecessor-version":[{"id":1012615,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1012614\/revisions\/1012615"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1012614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}