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’t load. With all the updates to The Events Calendar and Facebook Import, does this code snippet still function?
// Try to add a link to the FB event pages right before the content
add_action( 'tribe_events_single_event_before_the_content', 'link_to_fb_event' );
function link_to_fb_event() {
// Check if the event is associated with a Facebook event
$fbid = tribe_get_event_meta( get_the_ID(), '_FacebookID' );
if ( empty( $fbid ) ) return;
// Form and display a link to the FB event page if so
$fburl = esc_url( "<a href="http://facebook.com/events/$fbid/"" rel="nofollow">http://facebook.com/events/$fbid/"</a>; );
echo '<a href="' . $fburl . '">See this event on Facebook</a>';
}
Is there new code that will correct this or a function in the current release that I might be overlooking
Thanks for your time
Brandon
-
This topic was modified 10 years, 7 months ago by
Brandon.