{"id":1113925,"date":"2016-05-12T10:48:36","date_gmt":"2016-05-12T17:48:36","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/"},"modified":"2016-05-23T20:23:06","modified_gmt":"2016-05-24T03:23:06","slug":"problems-adding-a-facebook-button-to-an-event","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/","title":{"rendered":"Problems adding a facebook button to an event"},"content":{"rendered":"<p>Hello, We&#8217;re using events calendar pro pluggin.<br \/>\nWe&#8217;ve made a customized event view where there are two buttons, one for selling tickets and another for facebook.<br \/>\nThe selling tickets button works perfectly but the other doesn&#8217;t work.<br \/>\nCould you help us or tell us what&#8217;s wrong, please?<\/p>\n<p>Single event&#8217;s Php code attached below:<\/p>\n<p>&lt;?php<br \/>\n\/**<br \/>\n * Single Event Template<br \/>\n * A single event. This displays the event title, description, meta, and<br \/>\n * optionally, the Google map for the event.<br \/>\n *<br \/>\n * Override this template in your own theme by creating a file at [your-theme]\/tribe-events\/single-event.php<br \/>\n *<br \/>\n * @package TribeEventsCalendar<br \/>\n *<br \/>\n *\/<\/p>\n<p>if ( ! defined( &#8216;ABSPATH&#8217; ) ) {<br \/>\n\tdie( &#8216;-1&#8217; );<br \/>\n}<\/p>\n<p>$events_label_singular = tribe_get_event_label_singular();<br \/>\n$events_label_plural = tribe_get_event_label_plural();<\/p>\n<p>$event_id = get_the_ID();<\/p>\n<p>$additional_fields = tribe_get_custom_fields();<\/p>\n<p>?&gt;<\/p>\n<p>&lt;div id=&#8221;tribe-events-content&#8221; class=&#8221;tribe-events-single&#8221;&gt;<\/p>\n<p>\t&lt;!&#8211; Notices &#8211;&gt;<br \/>\n\t&lt;?php tribe_the_notices() ?&gt;<\/p>\n<p>    &lt;?php echo tribe_event_featured_image( $event_id, &#8216;full&#8217;, false ); ?&gt;<br \/>\n\t&lt;div class=&#8221;tribe_events_the_data&#8221;&gt;<br \/>\n\t      &lt;!&#8211; Title &#8211;&gt;<br \/>\n          &lt;?php the_title( &#8216;<\/p>\n<h1>&#8216;, &#8216;<\/h1>\n<p>&#8216; ); ?&gt;<br \/>\n           &lt;!&#8211; Date &#8211;&gt;<br \/>\n            &lt;p class=&#8221;event_date&#8221;&gt;<br \/>\n               &lt;?php echo tribe_get_start_date( $post-&gt;ID, true, &#8216;l&#8217; ) . &#8216; &#8216;; ?&gt; ,<br \/>\n               &lt;?php echo tribe_get_start_date( $post-&gt;ID, true, &#8216;d&#8217; ) . &#8216; &#8216;; ?&gt; de<br \/>\n               &lt;?php echo tribe_get_start_date( $post-&gt;ID, true, &#8216;F Y&#8217; ) . &#8216; &#8216;; ?&gt; \/\/<br \/>\n               &lt;?php echo tribe_get_start_date( $post-&gt;ID, true, &#8216;H:i&#8217; ) . &#8216; &#8216;; ?&gt;<br \/>\n            &lt;\/p&gt;<br \/>\n            &lt;!&#8211; The Cost &#8211;&gt;<br \/>\n            &lt;div class=&#8221;tribe-event-cost&#8221;&gt;<br \/>\n                  &lt;p&gt;<br \/>\n                       &lt;?php if($additional_fields[&#8216;Entrada Anticipada&#8217;]) : ?&gt;<br \/>\n                           Anticipada:<br \/>\n                           &lt;?php echo $additional_fields[&#8216;Entrada Anticipada&#8217;]; ?&gt;<br \/>\n                       &lt;?php endif; ?&gt;<\/p>\n<p>                       &lt;?php if($additional_fields[&#8216;Entrada Taquilla&#8217;]) : ?&gt;<br \/>\n                           Taquilla:<br \/>\n                           &lt;?php echo $additional_fields[&#8216;Entrada Taquilla&#8217;]; ?&gt;<br \/>\n                       &lt;?php endif; ?&gt;<br \/>\n                  &lt;\/p&gt;<br \/>\n            &lt;\/div&gt;<br \/>\n                &lt;!&#8211; Event Buy &#8211;&gt;<br \/>\n                &lt;?php $url = tribe_get_event_website_url(); ?&gt; <\/p>\n<p>                &lt;?php if ( $url ) : ?&gt;<br \/>\n                    &lt;div class=&#8221;tribe-events-event-button&#8221;&gt;<br \/>\n                          <a>&#8221; class=&#8221;my-button-class single-event-button&#8221;&gt;Comprar<\/a><br \/>\n                    &lt;\/div&gt;<br \/>\n                &lt;?php endif; ?&gt;<\/p>\n<p>        &lt;!&#8211; Content &#8211;&gt;<br \/>\n            &lt;?php the_content(); ?&gt;<\/p>\n<p>        &lt;!&#8211; Event Buy &#8211;&gt;<br \/>\n            &lt;?php $url_facebook = $additional_fields[&#8216;Evento Facebook&#8217;]; ?&gt;<br \/>\n            &lt;?php if ( $url_facebook ) : ?&gt;<br \/>\n                &lt;div class=&#8221;tribe-events-event-button button-facebook&#8221;&gt;<br \/>\n                    <a>&#8221; class=&#8221;my-button-class single-event-button facebook&#8221;&gt;Evento Facebook<\/a><br \/>\n                &lt;\/div&gt;<br \/>\n            &lt;?php endif; ?&gt;<br \/>\n\t&lt;\/div&gt;<\/p>\n<p>\t&lt;div class=&#8221;tribe-events-schedule tribe-clearfix&#8221;&gt;<br \/>\n\t\t&lt;?php if ( tribe_get_cost() ) : ?&gt;<br \/>\n\t\t\t&lt;span class=&#8221;tribe-events-divider&#8221;&gt;|&lt;\/span&gt;<br \/>\n\t\t\t&lt;span class=&#8221;tribe-events-cost&#8221;&gt;&lt;?php echo tribe_get_cost( null, true ) ?&gt;&lt;\/span&gt;<br \/>\n\t\t&lt;?php endif; ?&gt;<br \/>\n\t&lt;\/div&gt;<\/p>\n<p>\t&lt;!&#8211; Event header &#8211;&gt;<\/p>\n<p>\t&lt;!&#8211; #tribe-events-header &#8211;&gt;<\/p>\n<p>\t&lt;!&#8211; Event footer &#8211;&gt;<\/p>\n<p>\t&lt;!&#8211; #tribe-events-footer &#8211;&gt;<\/p>\n<p>&lt;\/div&gt;&lt;!&#8211; #tribe-events-content &#8211;&gt;<\/p>\n<p>Thanks for your time.<\/p>\n","protected":false},"template":"","class_list":["post-1113925","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>Problems adding a facebook button to an 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\/problems-adding-a-facebook-button-to-an-event\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Problems adding a facebook button to an event -\" \/>\n<meta property=\"og:description\" content=\"Hello, We&#8217;re using events calendar pro pluggin. We&#8217;ve made a customized event view where there are two buttons, one for selling tickets and another for facebook. The selling tickets button works perfectly but the other doesn&#8217;t work. Could you help us or tell us what&#8217;s wrong, please? Single event&#8217;s Php code attached below: &lt;?php \/** [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-05-24T03:23:06+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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/\",\"name\":\"Problems adding a facebook button to an event -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-05-12T17:48:36+00:00\",\"dateModified\":\"2016-05-24T03:23:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-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\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Problems adding a facebook button to an 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":"Problems adding a facebook button to an 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\/problems-adding-a-facebook-button-to-an-event\/","og_locale":"en_US","og_type":"article","og_title":"Problems adding a facebook button to an event -","og_description":"Hello, We&#8217;re using events calendar pro pluggin. We&#8217;ve made a customized event view where there are two buttons, one for selling tickets and another for facebook. The selling tickets button works perfectly but the other doesn&#8217;t work. Could you help us or tell us what&#8217;s wrong, please? Single event&#8217;s Php code attached below: &lt;?php \/** [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/","article_modified_time":"2016-05-24T03:23:06+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/","name":"Problems adding a facebook button to an event -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-05-12T17:48:36+00:00","dateModified":"2016-05-24T03:23:06+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-event\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/problems-adding-a-facebook-button-to-an-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":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Problems adding a facebook button to an 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\/1113925","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\/1113925\/revisions"}],"predecessor-version":[{"id":1114005,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1113925\/revisions\/1114005"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1113925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}