Created
July 28, 2023 10:40
-
-
Save alanef/7f79f05e2b7a9c145feea8e70724617f to your computer and use it in GitHub Desktop.
Custom Filter to hide events from front end
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
<?php | |
/* | |
* Plugin Name: Quick Event Manager - Hide Events from front end and search | |
* Plugin Description: Custom filter to hide events from front end and search | |
*/ | |
add_filter( 'qem_event_register_event_cpt', function ( $args ) { | |
$args['$publicly_queryable'] = false; | |
$args['$exclude_from_search'] = true; | |
return $args; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment