Skip to content

Instantly share code, notes, and snippets.

@jazbek
Last active December 20, 2015 13:09
Show Gist options
  • Select an option

  • Save jazbek/6136353 to your computer and use it in GitHub Desktop.

Select an option

Save jazbek/6136353 to your computer and use it in GitHub Desktop.
Fix double comments form showing - temporary fix until we've released a fix
<?php
function tribe_no_comments_form() {
return TribeEvents::instance()->pluginPath . 'admin-views/no-comments.php';
}
add_action( 'tribe_events_before_view', 'tribe_disable_comments_form' );
function tribe_disable_comments_form() {
add_action( 'comments_template', 'tribe_no_comments_form' );
}
add_action( 'tribe_events_after_view', 'tribe_enable_comments_form' );
function tribe_enable_comments_form() {
remove_action( 'comments_template', 'tribe_no_comments_form' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment