Created
December 11, 2023 15:05
-
-
Save alanef/65f8ecc744c1f6669cba4b4e906a6c32 to your computer and use it in GitHub Desktop.
Filter to remove comments from Event Post Type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('qem_event_register', function($args) { | |
if(isset($args['supports']) && is_array($args['supports'])) { | |
$args['supports'] = array_diff($args['supports'], ['comments']); | |
} | |
return $args; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment