Skip to content

Instantly share code, notes, and snippets.

@jazbek
Last active December 20, 2015 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jazbek/6107914 to your computer and use it in GitHub Desktop.
Save jazbek/6107914 to your computer and use it in GitHub Desktop.
Add website field to community submit form
add_filter( 'tribe_events_form_metabox_after_the_organizer', 'tribe_community_add_event_website_field');
function tribe_community_add_event_website_field( $post_id ) {
$event_url = isset($_POST['EventURL']) ? $_POST['EventURL'] : '';
echo '<table class="tribe-community-event-info" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="tribe_sectionheader">
<h4 class="event-time">Event Website</h4>
</td><!-- .tribe_sectionheader -->
</tr>
<tr>
<td>URL</td>
<td><input autocomplete="off" tabindex="'. TribeCommunityEvents::instance()->getTabIndex() .'" type="text" id="EventURL" name="EventURL" value="'.esc_attr( $event_url ).'" /></td>
</tr>
</table>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment